PHP Introduction
- PHP (full name: Php:hypertext preprocessor, or "PHP: hypertext Preprocessor ") is a common open source scripting language .
- The PHP script executes on the server .
- PHP is free to download and use.
- PHP files can contain text, HTML, JavaScript code, and PHP code
- PHP code executes on the server and results are returned to the browser in plain HTML
- The default file name extension for PHP files is ". php"
- PHP can generate dynamic page content
- PHP can create, open, read, write, and close files on the server
- PHP can collect form data
- PHP can send and receive cookies
- PHP can add, delete, and modify data in your database
- PHP can restrict users from accessing some pages on your site
- PHP can encrypt data
With PHP, you are no longer limited to outputting HTML. You can export images, PDF files, or even Flash movies. You can also export arbitrary text, such as XHTML and XML.
- PHP can be run on different platforms (Windows, Linux, Unix, Mac OS X, etc.)
- PHP is compatible with almost all servers currently in use (Apache, IIS, etc.)
- PHP provides a wide range of database support
- PHP is free and can be downloaded from the official PHP resources: www.php.net
- PHP is easy to learn and runs efficiently on the server side
PHP installation
To get started with PHP, you can:
- Find a Web host that supports PHP and MySQL
- Install the WEB server on your own PC, then install PHP and MySQL
- using PHP support the Web Host
If your server supports PHP, then you don't need to do anything.
Whenever you create a. php file in your web directory, the server will parse the files for you automatically.
You do not need to compile any software, or install additional tools.
Because PHP is free, most WEB hosts provide support for PHP.
- on your own PC build PHP on-Machine
However, if your server does not support PHP, you must:
- Installing the WEB server
- Install PHP
- Install the database, such as MySQL
The official PHP website (php.net) has PHP installation instructions: http://php.net/manual/en/install.php
For beginners, it is recommended to use the integrated server component, which already includes PHP, Apache, Mysql and other services, eliminating the time spent by developers in the tedious configuration environment process.
The Window system can use wampserver,:http://www.wampserver.com/, support 32-bit and 64-bit systems, and select versions according to its own system.
Wampserver installation is simple, you just have to click "Next" to complete the installation.
The XAMPP supports MAC OS and Window systems: https://www.apachefriends.org/zh_cn/.
IDE (Integrated development environment, integrated development environment)
Eclipse is an open-source, Java-based, extensible development platform (if the JDK is not installed, you need to download the JDK installation first). For its part, it is just a framework and a set of services for building a development environment through plug-in components. Fortunately, Eclipse comes with a standard set of plugins, including Java development tools (Java Development kit,jdk).
Supports Windows, Linux, and Mac OS platforms.
Eclipse for PHP official: HTTP://WWW.ECLIPSE.ORG/DOWNLOADS/PACKAGES/ECLIPSE-PHP-DEVELOPERS/HELIOSR
Phpstorm is a lightweight and convenient PHP IDE designed to provide user efficiency, a deep understanding of the user's coding, smart code completion, quick navigation, and instant error checking.
The Phpstorm is ideal for PHP developers and front-end engineers. Available in: Smart html/css/javascript/php editing, code quality analysis, version control integration (SVN, GIT), debugging and testing.
Supports Windows, Linux, and Mac OS platforms.
Phpstorm official: http://www.jetbrains.com/phpstorm/download/
Knowledge of PHP before use