Home >Backend Development >PHP Tutorial >How to execute php statements in html files, _PHP tutorial

How to execute php statements in html files, _PHP tutorial

WBOY
WBOYOriginal
2016-07-13 09:57:27850browse

You can also execute php statements in html files.

Modify the file httpd.conf in the conf directory of apache.

Search for AddType application/

Find the one without # in front and add AddType application/x-httpd-php .html below

In this way, even if the file suffix is ​​html, it will be compiled by the php engine before it can be output to the browser.

It is recommended not to do this. If this is the case, what the browser can output directly must also go through the PHP engine. You are not tired, but the engine is still!

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/981356.htmlTechArticleYou can also execute php statements in html files and modify the file httpd.conf in the conf directory of apache. Search AddType application/ to find the one without # in front, add Add below...
Statement:
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