Home  >  Article  >  Backend Development  >  Detailed explanation of steps to configure PHP server environment

Detailed explanation of steps to configure PHP server environment

WBOY
WBOYOriginal
2016-07-25 08:54:031264browse
  1. #Import PHP5 module
  2. LoadModule php5_module "D:/Program Files/PHP/php5apache2_2.dll"
  3. #Files ending in .php can be recognized in the URL
  4. AddType application/x-httpd-php .php
  5. # Files ending in .phps can be identified in the URL
  6. AddType application/x-httpd-php-source .phps
  7. #Website default PHP homepage
  8. DirectoryIndex index.html index.htm index.php default.php
  9. #PHP.ini storage Directory
  10. #PHPIniDir "D:/Program Files/PHP"
Copy code

Note that if PHP.ini is placed under C:/WINDOWS (or C:/WINNT), there is no need to configure PHPIniDir

Then, open with Notepad: D:/Program Files/Apache Software Foundation/Apache2.2/conf/httpd.conf

Add a line at the end of the file: Include conf/extra/httpd-php5.conf

The fourth step is to test the PHP server configuration and check whether the PHP environment is successfully established? Restart Apache and open the directory: D:/Program Files/Apache Software Foundation/Apache2.2/htdocs Create a new file: index.php Input content:

  1. phpinfo();
  2. ?>
Copy the code

Open the browser and check http://localhost or http://127.0.0.1. php server environment setup and configuration (apache and iis two methods) How to build a php server environment Configuring php server environment under ubuntu php and mysql server configuration instructions php class to get server information An alternative way to obtain server-side information using php php code to get server information



Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn