Solve the problem that the PHP code opened in the browser is commented in the PHP file

Method 1: Because the outer side is html and php is mixed in the middle, changing the file suffix to html has no effect.

Method 2: Modify the httpd.conf file, as shown in the following figure, it is invalid. Reference link: https://www.cnblogs.com/6luv-ml/p/6678138.html

Method 3: Move the php code to the <body> tag of html, it has no effect.

Method 4: Modify the encoding format of the file. This method succeeds.

If you encounter a problem, try more than one, and which one will become.

Published 125 original articles · Like 31 · Visits 60,000+

Guess you like

Origin blog.csdn.net/Fiverya/article/details/104508724