php文件不能解析

2024-12-10 12:34:44
推荐回答(2个)
回答(1):

html文件能访问说明web服务器是正常运行的,这个问题是由于你的apache服务器的脚本解释器没有配置好,

LoadModule "php静态库名.so"

找到


#在此标签末尾加上php的路径映射
ScriptAlias /cgi-bin/ "...../Apache Software Foundation/Apache2.2/cgi-bin/"
ScriptAlias /php/ "....../php-5.2.6-Win32/"



#
# TypesConfig points to the file containing the list of mappings from
# filename extension to MIME-type.
#
.
.
.
#在下面加入MIME类型,服务器根据MIME类型来调用想用的脚本解释器

AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType application/x-httpd-php .php

#AddHandler php5-script php, 我这里用的是windows
Action application/x-httpd-php "/php/php-cgi.exe"

回答(2):

检查下配置!