*.php.html 用作 php ;/

*.php.html 用作 php ;/

我在 apache2 上使用 mod_php,为什么.php.html页面以 php 形式提供?这会破坏 phpdoc 输出(我已启用短标签,并将继续启用它们,以便将其解析<?xml ver[...]?>为 PHP)

如何强制将.php.html页面以 HTML 形式呈现?

我有

AddHandler application/x-httpd-php .php .php3 .php4 .php5

在 mod conf 中

<IfModule mod_php5.c>
AddType application/x-httpd-php .php .php3
AddType application/x-httpd-php-source .phps
</IfModule>

答案1

Redhat 已经知道这个问题一段时间了。检查这个错误帖子关于这个问题。

基本上,他们不认为这是一个错误,并且从安全角度来看,他们希望应用程序能够处理审查文件。

答案2

添加

AddHandler text/html .php.html .html
AddType text/html .php.html .html

AddHandler application/x-httpd-php .php .php3 .php4 .php5

工作-.-'''

相关内容