Home > php教程 > php手册 > body text

在html文件中也可以执行php语句的方法,

WBOY
Release: 2016-06-13 09:07:19
Original
847 people have browsed it

在html文件中也可以执行php语句的方法,

在apache的conf目录中修改文件httpd.conf。

搜索AddType application/

找到前面没有#的那条,在下面添加AddType application/x-httpd-php .html

这样,即使后缀是html的文件,也会经过php引擎编译才能输出到浏览器中。

建议不要这样做,如果是这样的话,浏览器可以直接输出的也要经过php引擎。你不累,引擎还累呢!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!