Download Apache and php decompression, the article uses Apache2.2+php5.4
to modify the configuration file
Apache configuration file: Apache\conf\httpd.conf
ServerRoot "D:/SERVER/Apache2.2" #Start
port
Listen 80 #Specify the
php location, Add support for php5, add
LoadModule php5_module "D:/SERVER/php-5.4.45/php5apache2_2.dll" under #LoadModule vhost_alias_module modules/mod_vhost_alias.so
AddType application/x-httpd-php .php
PHPIniDir "D:/ SERVER/php-5.4.45" #Specify
the root directory of the site
DocumentRoot "D:/DATA/php/htdocs"
<Directory "D:/DATA/php/htdocs"> #Set
the priority of the entry file
<IfModule dir_module>
DirectoryIndex welcome.php index.html index.php
</IfModule>
PHP configuration file: php-5.4.45\php.ini
php.ini-development file renamed to php.ini
#Specify the specific directory of the PHP extension package in order to call the corresponding DLL file
; On windows:
extension_dir = "D:/SERVER/php-5.4.45/ext" #Remove the
following configuration comments, support mysql, etc.
extension=php_curl.dll
extension =php_gd2.dll
extension=php_mysql.dll
extension=php_mysqli.dll
extension=php_pdo_mysql.dll
extension=php_pdo_odbc.dll #Upload
file directory configuration
upload_tmp_dir = "D:/DATA/php/upload" #Time
zone configuration
date.timezone =Asia/ Shanghai
Restart Apache.
Tips: d:\apache24\bin\httpd.exe -k install, this sentence can add apache to system services