Home >Backend Development >PHP Tutorial >How to execute php statements in html files, _PHP tutorial
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!