<分区>
我正在为 Apache 服务器编程,我只需要将一个特定的 html 页面(例如,first.htm)作为 PHP 脚本处理。是否可以设置?
<分区>
我正在为 Apache 服务器编程,我只需要将一个特定的 html 页面(例如,first.htm)作为 PHP 脚本处理。是否可以设置?
最佳答案
SetHandler
也可以使用指令:
Forces all matching files to be processed by a handler
When placed into an .htaccess file or a or section, this directive forces all matching files to be parsed through the handler given by handler-name.
<Files first.htm>
SetHandler application/x-httpd-php
</Files>
关于php - 在 Apache 服务器上将特定的 .htm 页面处理为 .php,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11234010/