Create a new html file with the following content:
When executed, it was found that there was no content displayed on the page, " "No expected output;
In the configuration of apache (recommended:php server) (/usr/local/ apache/conf/httpd.conf), the html file is not added to the executable type, as follows:
As you can see, only the extensions are .php and . phtml files will be executed. So add .html and restart apache, the display is normal
service httpd {start|restart|stop}
The above is the detailed content of If php is added to html, nothing will be displayed.. For more information, please follow other related articles on the PHP Chinese website!