【发布时间】:2015-06-03 06:38:44
【问题描述】:
我正在为 .php 和 .html 文件创建一个名为 helloworld 的虚拟处理程序。处理程序包含以下内容:
static int helloworld_handler(request_rec *r){
ap_rprintf(r, "hello world!");
return OK;
}
我在 apache2.conf 中有这个:
<Directory /var/www/html>
AddHandler helloworld .php .html
</Directory>
处理程序“helloworld”适用于 .html 文件,但不适用于 .php 文件。我认为这主要是因为默认的 php 处理程序覆盖了 .php 文件的 helloworld 处理程序。如何使“helloworld”处理程序适用于 .php 文件?
如果需要任何额外信息,请询问。
【问题讨论】:
-
是的,它是相似的。但是那里没有正确的答案。