Apache2.4 环境:https://www.microsoft.com/en-US/download/details.aspx?id=48145
php5.6 环境:http://www.microsoft.com/en-us/download/details.aspx?id=30679
设置环境变量path:php解压路径;如:d:\php\php5.6
cmd >php -v 出现php版本信息
Apache安装:
cmd cd进Apache的解压路径的bin文件夹
d:
cd d:\php\Apache24\bin
httpd -k install
查看80端口是否占用
netstat -aon|findstr "80"
注意httpd.conf里面的serverroot要修改成Apache对应的解压路径
Define SRVROOT "d:\php\Apache24"
ServerRoot "${SRVROOT}"
启动服务:httpd -k start
添加php支持:
# php5 support
LoadModule php5_module D:/php/php5.6/php5apache2_4.dll
AddType application/x-httpd-php .php .html .htm
# configure the path to php.ini
PHPIniDir "D:/php/php5.6/"
php.ini配置:
支持短标签:http://php.net/short-open-tag
short_open_tag = on
时间: 2024-10-04 16:51:56