I created a simple HTML webpage that includes the following PHP code in the HTML code.
When I run
I had the same problem and fixed it by changing the URL from file://www/[Project] to localhost/[Project].
Even if the file is saved as a .php, it will comment out the PHP if the file is opened from the file system.