#php cannot be parsed in html?
Phenomena:
php and apache are installed, but the browser cannot parse the php code for such code.
<html><body><h1>d</h1> <?php echo "test"; ?> </body></html>
Solution:
Add the following two items to httpd.conf, restart. OK!
AddHandler php5-script .php .html AddType text/html .php .html
Note: If it is php7, change the php5-script in the first line to php7-script.
For more PHP related knowledge, please visit PHP Chinese website!
The above is the detailed content of php cannot be parsed in html. For more information, please follow other related articles on the PHP Chinese website!