How to run PHP code in HTML file


You can’t run PHP in .html files because the server does not recognize that as a valid PHP extension unless you tell it to. This video will show you how to make it possible to run PHP code in .html file.



  1. Omg thank you so much for this! 🙂 We need more videos like this! I'm surprise no body has did this yet. Again thank you!

  2. so im studying to be a web developer and am creating a chatroom for my website and am going to have to use php code, but is it true if you save a php file and try to open it as a web page using a web browser to get it to display as a web page in the browser it wont work, so if you write php code you still have to save it as a html file in order for it to display as a web page in a browser?


Please enter your comment!
Please enter your name here