Frequently Asked Questions
PHP in .html pages?
-
PHP in .html pages?
Posted on May 21, 2004
Written by
Sasha (view more by Sasha)
Filed under FAQ, PHP
When a try to view anything.html, which has PHP code in it, it either doesn’t show up, or it will show me the code. Why?
PHP won’t execute any coding unless the extension of the page is .php. So no PHP code will work on .html pages - that’s why. Change your extension to .php and it will work.