我正在创建一个名为
helloworld
的虚拟处理程序,用于处理.php和.html文件。该处理程序包含以下内容: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文件?
如果需要额外的信息,请询问。