处理特定的.htm页作为的.php Apache服务器上器上、htm、php、Apache

2023-09-02 20:34:25 作者:深海情劫

我是编程Apache服务器,我需要的只是一个特定的HTML页面(比如,first.htm)被处理为PHP脚本。是否有可能成立?

I'm programming for an Apache server and I need for just one specific html page (say, first.htm) to be processed as PHP script. Is it possible to set up?

推荐答案

创建的.htaccess 称为文件,并将其放置在目录中该文件将在添加此行至TI:

Create a file called .htaccess and place it in the directory this file will be in. Add this line to ti:

<Files first.htm>
    AddType application/x-httpd-php .htm
</Files>