1,安装准备
下载mysql,apacche2.2,php
2,安装mysql
过程略
3,安装apache2.2
过程略
4,配置apache
4.1修改httpd.conf ,找到DocumentRoot ,将其设置为你所要存放php, htm等网页文件的文件夹,如 "E:\Program Files\Apache Software Foundation\Apache2.2\htdocs";
4.2找到 DirectoryIndex ,在index.html后添加index.php, index.htm等,以单个空格将其分开
4.3在http.conf最后加上如下配置文件
LoadModule php5_module "E:/php/xampp/php/php5apache2_2.dll"
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
Action application/x-httpd-php "/php/php-cgi.exe"
AddType application/x-httpd-php .html
AddType application/x-httpd-php .htm
AddDefaultCharset UTF8
PHPIniDir "E:/php/xampp/php"
其中PHPIniDir为PHP的根目录
5,重新启动apache即可