PHP Background Development (i) Hello World installation
Development environment for Ubuntu 12.04, select linux+apache+php development environment
Installing Apache2
sudo apt-get install apache2
Install PHP
sudo apt-get install php5
Install MySQL (note that you need to enter the root password during installation)
sudo apt-get install Mysql-server
Installing Apache's parsing module
sudo apt-get install libapache2-mod-php5sudo apt-get install libapache2-mod-auth-mysql
Installing the MySQL connection module for PHP
sudo apt-get install php5-mysql
Install the GD library for processing pictures
sudo apt-get install PHP5-GD
Launch Apache
By default, the root directory is/var/www/html
Enter Test address http://localhost/
Change the default development path
Configuration path of the default file directory for Apache2:/etc/apache2/sites-enabled/000-default.conf
The path to the development directory after modifying the contents of DocumentRoot
Path to the default profile for Apache2:/etc/apache2/apache2.conf
Permission to add a file path
Hello World
Under the development directory, open a file index.php
Input
<? PHP Echo ";? >
Open: Address http://localhost/will see the results.
PHP Background Development (i) Hello World