将 HTML 文件解析为 PHP [英] Parsing HTML files as PHP

查看:36
本文介绍了将 HTML 文件解析为 PHP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是将 html 文件解析为 php 的正确方法吗?

Is this the correct way to parse html files as php?

RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html

保存在我的根文件夹中的 .htaccess 文件中?

Saved in a .htaccess file in my root folder?

我添加了一个通过 php 调用的导航栏,这样可以省去重命名我所有的 html 文件!

I am adding in a navigation bar that is called in via php and this would save renaming all my html files!

谢谢

推荐答案

RewriteEngine on 
RewriteRule ^(.*).htm $1.php

这篇关于将 HTML 文件解析为 PHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆