【发布时间】:2017-08-19 15:44:09
【问题描述】:
添加此代码:
AddType application/x-httpd-php .php 之后
...
#AddEncoding x-compress .Z
#AddEncoding x-gzip .gz .tgz
#
# If the AddEncoding directives above are commented-out, then you
# probably should define those extensions to indicate media types:
#
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
到
C:\Apache24\bin\httpd.conf
下载我系统上的所有 PHP 页面而不是渲染它。
在此之前,PHP 页面被解析为原始文本。
需要帮助!
【问题讨论】:
-
你是用 PHP 作为 fcgi 还是 apache 模块
-
PHP 作为 Apache 模块
-
确保代码在 标签之间
-
你是否将
LoadModule行添加到httpd.conf中,这样PHP 才能真正加载到apache 中 -
@RiggsFolly 谢谢,这就是问题所在。