1. History of PHP:
Created by Rasmus Lerdorf in Perl in 1994 and later rewritten in C;
In 1995, PHP1 and PHP2 were released under the name of Personal Home Page Tools (PHP Tools);
By the end of 1996, there were 15,000 websites using PHP;
In 1997 Zeev Suraski and Andi Gutmans rewrote the PHP parser and renamed it PHP: Hypertext Preprocessor;
PHP3 was officially released in 1998;
Zend Technologies was established in 1999;
2000 PHP4 released;
2004 PHP5 released;
2. Advantages of PHP:
(1) Simple syntax
(2)Low learning cost
(3) High development efficiency
(4) Cross-platform
(5) Convenient development and deployment
(6) There are many open source frameworks (such as: ThinkPHP)
(7) There are many open source CMS systems (such as: Joomla, WordPress)
(8) The open source website system is very rich (such as: DiscuzX)
3.Explanation of PHP related terms
(1)Linux
Server Operating System
(2)Cygwin
Simulate the environment under Linux under Windows
(3)Apache httpd
web server
(4)Nginx
web server
(5)MySQL
Database
(6)XAMPP
Integrate web server, database and php to quickly build a development environment
(7)Eclipse PDT
IDE
(8)ZendStudio
IDE
(9)PhpStorm
IDE
(10)FTP
File Transfer Protocol
(11)SSH
Connect to server command
(12)SCP
Upload and download file commands
4.PHP development environment: (Build LAMP environment under Unbuntu Server)
First of all, we can see the working principle of LAMP through the picture below:
Note: CURD means database addition, deletion, modification and query
Install apache:
sudo apt-get install apache2
apache2 -v
Install PHP:
sudo apt-get install php5
php5 -v
Check whether apache has loaded the libphp5.so package:
cat /ect/apache2/mods-enabled/php5.load
If the terminal prints LoadModule php5_module /usr/lib/apache2/modules/libphp5.so, it means it has been loaded OK.
Install MySQL:
sudo apt-get install mysql-server
During the installation process, you need to set the password of the database root user.
Install php5 support MySQL module:
sudo apt-get install php5-mysql
Check whether supporting MySQL module is complete:
cat /etc/php5/mods-available/mysql.ini
If the terminal prints extension=mysql.so, it means the installation is OK.
Restart MySQL:
sudo service mysql restart
Restart apache:
sudo service apache2 restart
The installation is now complete!
Other installation methods:
1. Install all required software packages through one-time command line:
sudo apt-get install apache2 php5 mysql-server php5-mysql
2. Use tasksel to install all required software packages:
sudo tasksel install lamp-server