Sharley wrote:How are you opening your files?
http://localhost/website/yourfile.php or similar should parse the php code.
http://localhost/website/yourfile.html would not parse the php code.
If all your files with php code content have a .html extension and you don't want to change them all to having a php extension then this post may help:
This is incorrect as the file needs to be parsed by the server not the browser - unlike html code that is parsed by the browser and can be opened directly in a browser.Right-click on file and 'open with Firefox'
Sharley wrote:You need to open a .php coded file using a URI as I pointed out in my first post, for example:
Or after editing the httpd-xampp.conf file and php code within a .html file:
In other words if you have php code in a file either .php or .html, it has to be parsed by the server.
When ever you edit a server configuration file you must restart the server (stop then start Apache not refresh the Control Panel) to have the edits recognized.
Users browsing this forum: No registered users and 53 guests