I built a website some time ago for a company and its pages are primarily in html with a few php pages to support some dynamic content.
The company now requires dynamic content on their index.html page and although I was under the impression I could just open up some standard php tags, add in my lines of php and away you go, it appears that’s not the case and my php will not run.
Can anyone explain what is required in order for my php code to run within a .html page?
Thanks, Jonny
The server needs to be told to run the document through the PHP engine.
This is usually done by giving the file a
.phpextension.You can also configure the server to pass files other other file extensions or specific files through PHP, but how you do that depends on the server (and is a matter of server configuration, not programming).