2011-08-19 44 views
0

我有一個小的.htaccess文件,允許我跑1個HTML文件作爲PHP.htaccess文件的小問題?

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

我需要所以它運行的所有.html和.htm文件爲.PHP 編輯這個腳本,我需要這個申請文件不僅yourpage.html 我試圖那樣做

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

,但它不會使 我雖然刪除yourpage.html任何意義,把*。html的,但我不t如果其方法正確

+0

這似乎在這裏已經回答: http://stackoverflow.com/questions/4687208/using-htaccess-to-make-all-html-pages-to-run- as-php-files – Chris

+0

[htaccess文件和處理程序的問題可能重複?](https://stackoverflow.com/questions/7127156/problem-with-htaccess-file-and-handlers) – kenorb

回答

1

用途:

AddType application/x-httpd-php .html