小问题.htaccess文件?文件、问题、htaccess

2023-09-02 10:11:19 作者:優柔寡斷

我有一个小的.htaccess文件,允许我跑1 HTML文件作为PHP

i have a small .htaccess file which allow me to run 1 html file as php

<Files yourpage.html>
AddType application/x-httpd-php .html
</Files>

我需要编辑这个脚本,以便它运行所有的.html和.htm文件作为.PHP 我需要这个申请文件不仅yourpage.html 我试图做这样的

i need to edit this script so it run all .html and .htm files as .php and i need this to apply for the files not only yourpage.html i tried to do it like that

AddType application/x-httpd-php5 .php .html

,但它并没有任何意义 不过,我觉得,除去yourpage.html,把*。html的,但我不如果以正确的方式或不

but it doesn't make any sense i though to remove yourpage.html and put *.html but i don't if its the right way or not

推荐答案

使用:

AddType application/x-httpd-php .html