Recently received a program to do a teacher's project, doing PHP research and ancillary project development. Previously, no contact with PHP, here to do an understanding to get started.
1, PHP
PHP, hypertext preprocessor, hypertext preprocessor, a general-purpose 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, which are not common forms of static Web pages such as HTM, HTML, shtml, XML, etc., but are suffixes in the form of aspx,. asp,. jsp,. PHP,. Perl,. CGI, and so on. And in the Dynamic Web site has a symbolic symbol-"?". PHP is more efficient at embedding programs into HTML documents than any other scripting language can do. and PHP can directly access the database, participate in Dynamic Web pages.
3. Development tools
Integrated development Environment, a collection of software development process needs of the environment, including code highlighting, code completion, debugging, 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
PHP features include: 1. PHP's unique syntax mixes C, Java, Perl, and PHP with its own innovative syntax. 2. PHP can perform dynamic Web pages faster than CGI or perl-dynamic pages, in contrast to other programming languages, PHP embeds programs in HTML documents and performs more efficiently than CGI that completely generates HTML tags; PHP has a very powerful function, all of the CGI functions of PHP can be implemented. 3. PHP supports almost all popular databases and operating systems. 4. The most important thing is that PHP can use C, C + + to expand the program!
5, Version Difference
PHP4, too old, does not support OO, has been eliminated; PHP6, or concept products, is still under development.
PHP5 's moderators have 4 main branches: PHP5.2 Previous versions, PHP5.2, PHP5.3, and PHP5.4 later versions.
Where PHP5.2, the previous version of the function is incomplete or bug; PHP5.4 later versions are used with instability.
Mainstream PHP program for PHP5.2 compatibility Best, the current PHP5.2 version is 5.2.17.
If you are developing your own use, PHP5.3 has an advantage and is a worthy version of the deployment project.
In addition to the version number, the same version of the PHP version is also different, and in the selection of PHP extensions to be aware of.
Install version: executable MSI format installation package.
Zip Version: Decompression can be used. There is no difference from the install version. It is recommended that you select a zip version.
Debug Version: End users don't care.
VC6 and VC9
If you are using PHP under Apache1 or apache2, you should choose VC6 version if you are in IIS (Internet Information Services (IIS, Internet Information Service) that is provided by Microsoft based on running Microsoft Basic Internet Services for Windows. Using PHP, you should select the VC9 version, the VC6 version uses Visual Studio6 compilation, VC9 compiles with Visual Studio 2008, and improves performance and stability. VC9 version of PHP requires you to install Microsoft 2008 C + + Runtime. Do not use the VC9 version under Apache.
6, PHP installation
Because the production site, requires 4 large lamp or WAMP, can not be separated from the Apache server Building, MySQL database application, PHP (or other scripting language). They need to be installed separately and able to configure their environment to build a Web server as a whole application.
But now there are a lot of installation packages that integrate these necessary components, where appserv, (other wampserver, etc.) are integrated with the amp and do not need to be configured with complex environments. So this software is very suitable 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's personal sharing website in our school, 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 remember password, After landing the Apache server database, login username and password is root and set their own password.