将HTML文件解析为PHP [英] Parsing HTML files as PHP
本文介绍了将HTML文件解析为PHP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
RemoveHandler .html .htm
AddType应用程序/ x-httpd-php .php .htm .html
保存在我的根目录下的.htaccess文件中文件夹?
我在通过php调用的导航栏中添加了一个导航栏,这将节省重命名我所有的html文件!
谢谢
解决方案
RewriteEngine on
RewriteRule ^ *)\.htm $ 1 \.php
Is this the correct way to parse html files as php?
RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html
Saved in a .htaccess file in my root folder?
I am adding in a navigation bar that is called in via php and this would save renaming all my html files!
Thanks
解决方案
RewriteEngine on
RewriteRule ^(.*)\.htm $1\.php
这篇关于将HTML文件解析为PHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文