Link Search Menu Expand Document

改动的文件 httpd.conf php.ini

记录盘符

apache24/conf/httpd.conf

Define SRVROOT "?:/loaclhost/apache24"

httpd.conf写入PHP支持模块

# PHP Modele andy25
LoadModule php5_module "d:/loaclhost/php-5.6.30-Win32-VC11-x86/php5apache2_4.dll"
PHPIniDir "d:/loaclhost/php-5.6.30-Win32-VC11-x86/php.ini"

# PHP application andy25
AddType application/x-httpd-php .php

添加PHP首页支持

<IfModule dir_module>
    DirectoryIndex index.html index.htm index.php
</IfModule>

配置PHP

php.ini-production文件重命名为php.ini 添加下面,去掉extension_dir前面分号“;” extension_dir = “?:/loaclhost/php-5.6.30-Win32-VC11-x86/ext”

Apache命令

bin目录下执行

安装

httpd -k install

卸载

httpd -k uninstall

启动

httpd -k start

重启

httpd -k restart

停止

httpd -k stop

其他命令

检查端口占用

netstat -ano