Detailed steps for configuring the PHP Server environment
- # Import the PHP5 module
- LoadModule php5_module "D:/Program Files/PHP/php5apache2_2.dll"
- # Identify the file ending with. php in the URL
- AddType application/x-httpd-php. php
- # Identify the file ending with. phps in the URL
- AddType application/x-httpd-php-source. phps
- # Default PHP homepage for websites
- DirectoryIndex index.html index.htm index. php default. php
- # Directory for storing PHP. ini
- # PHPIniDir "D:/Program Files/PHP"
Note: If PHP. ini is stored in C:/WINDOWS (or C:/WINNT), you do not need to configure PHPIniDir. Then, open D:/Program Files/Apache Software Foundation/Apache2.2/conf/httpd. conf in Notepad. Add a line at the end of the file: Include conf/extra/httpd-php5.conf Step 4: Test the php server configuration and check whether the php environment is successfully set up? Restart Apache and open the directory D:/Program Files/Apache Software Foundation/Apache2.2/htdocs to create a file: index. php input content:
- Phpinfo ();
- ?>
-
Open your browser and view http: // localhost or http: // 127.0.0.1. Php Server environment setup and configuration (apache and iis) php Server environment construction method: Configure php Server environment in ubuntu php and mysql server configuration description php obtains server information Class php obtains server information alternative method php obtains server information a piece of code |