为Apache添加php解析引擎:
其中 ScriptAlias为php的安装路径
在httpd.conf中添加
# For PHP 4
#------------------------------------------------------------
ScriptAlias /php/ "D:/apache/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"
# For PHP 5
#------------------------------------------------------------
ScriptAlias /php/ "f:/apache2/php5.0.3/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php-cgi.exe"
并在 DirectoryIndex 项添加 index.php
其中 ScriptAlias为php的安装路径
在httpd.conf中添加
# For PHP 4
#------------------------------------------------------------
ScriptAlias /php/ "D:/apache/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"
# For PHP 5
#------------------------------------------------------------
ScriptAlias /php/ "f:/apache2/php5.0.3/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php-cgi.exe"
并在 DirectoryIndex 项添加 index.php