If php is added to html, nothing will be displayed.

Release: 2023-02-28 10:14:02
Original
3480 people have browsed it

If php is added to html, nothing will be displayed.

Create a new html file with the following content:

  Example 
Copy after login

When executed, it was found that there was no content displayed on the page, " "No expected output;

If php is added to html, nothing will be displayed.

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:

If php is added to html, nothing will be displayed.

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

If php is added to html, nothing will be displayed.

service httpd {start|restart|stop}

If php is added to html, nothing will be displayed.

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!

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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!