Home > Backend Development > PHP Tutorial > 在html文件中也可以执行php语句的方法_PHP

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

WBOY
Release: 2016-05-30 08:48:01
Original
828 people have browsed it

在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 Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template