PHP Introductory knowledge and PHP development Appserv Tutorials
Recently received a project by the hospital to do PHP research and support project development. Previously, there was no contact with PHP, here to get an idea of getting started.
1. PHP
PHP, hypertext preprocessor, hypertext preprocessor, a common open source scripting language. Absorb C, Java and other language features, easy to get started, mainly for web development, its file suffix is PHP.
2. Language analysis
php can quickly execute Dynamic Web pages (Dynamic Web pages, i.e. URLs ) PHP can embed programs in html in the document to execute, the execution is very high efficiency. and
3. Development tools
Integrated development environment, which integrates the environment required in the software development process, including code highlighting, code completion, debugging, and version control. Common PHP Ides include the following:
Zend Studio: Business software, based on the Eclipse Open source framework.
Eclipse PDT: Open source.
4. Characteristics
features of PHP include:
1. PHP's unique syntax mixes C, Java, Perl, and PHP's self-innovative syntax.
2. PHP can execute dynamic pages more quickly than CGI or perl--dynamic pages, compared to other programming languages,
PHP is to embed the program into the HTML document to execute, the execution efficiency than the full HTML markup generated CGI is much higher;
PHP has a very powerful function, all CGI features PHP can be implemented.
3. PHP supports almost all popular databases as well as the operating system.
4. The most important thing is that PHP can be used in C, C + + program extension!
5, version difference
PHP4, Too old to support Oo, has been eliminated; php6, or a concept product, is still under development.
PHP5 's moderator has 4 branches: PHP5.2 Previous version, PHP5.2, PHP5.3, PHP5.4 later.
Where PHP5.2, the previous version of the function is incomplete or bug;php5.4 later version of the use of instability.
Mainstream PHP programs for PHP5.2 compatibility Best, the current PHP5.2 is the latest version is 5.2.17.
If you are developing your own use, PHP5.3 has the advantage of being a version of the deployment project that is worth considering.
In addition to the version number, the same version number of the PHP version is also different, and in the choice of PHP extension should be noted.
- Install version: an executable MSI format installation package.
- Zip version: Unzip can be used. No difference from the install version. We recommend that you select the zip version.
- Debug Version: End users don't need to care.
- VC6 and VC9
- If you use PHP under Apache1 or apache2, you should choose VC6 version.
If you are in IIS (InternetInformation Services (IIS, Internet Information Service), it is provided by Microsoft Corporation based on Internet basic services that are running Microsoft Windows. using PHP should choose VC9 version, VC6 version is compiled with Visual Studio6, VC9 is compiled with Visual Studio 2008, and improves performance and stability. The VC9 version of PHP requires you to install the Microsoft C + + Runtime. Do not use the VC9 version under Apache.
6. PHP Installation
Because the production site, need 4 big lamp or WAMP, can not be separated from Apache server Building, MySQL database application, PHP (or other scripting language). This requires a separate installation, and the ability to configure the environment between them can be used as a whole to build a Web server.
But now there are a lot of installation packages that integrate these necessary components, which are used by apps Erv, (other wampserver, etc.) integrates the AMP and does not require a complex environment to be configured. So this software is good for beginners PHP developers to use.
The following describes the installation and use of Appserv:
Download appserv: http://www.drpeng.org/tech/index.php (a teacher of our school's personal sharing site, there are a lot of good things).
Installation process: http://jingyan.baidu.com/article/ 91f5db1bf72ac01c7f05e3a7.html (Note that the default installation port to 8080 is more appropriate, in addition to keep in mind that password, back to the Apache server under the database login username and password is the root and their own set of password).