Junkie wrote:In Internet Explorer, when I do FILE > OPEN pointing to "C:\Program Files\xampp\htdocs\phpinfo.php", the page actually opens up in the Dreamweaver 8 Editor for PHP instead of the browser!
This is because IE is so tightly coupled with WIN it knows what applications are associated with file types. Dreamweaver will not parse the PHP, it will only open the file for editing.
Junkie wrote:In Firefox, when I do FILE > OPEN in firefox, it asks for the application of which to open phpinfo.php with. I've tried php-win.exe and php.exe and still it won't load.
As FF is not so coupled it does not know, hence it has to ask.
Doing this type of operation is the equivilent of double clicking on the file in WIN explorer!!
I know others have tried to explain this but I will give it another go.
A browser, any browser, does not know how to parse PHP. All a broswer can parse (run) is HTML, CSS and javascript. Thus when you use a browser to open a PHP file it doesn't know what to do with it, and thus asks you what application you want to use to try and parse it.
Put simply, the ONLY application that can parse PHP is php.exe!!!
You MUST call the php file via your webserver (apache), so that the php file is parsed by php.exe and all your broswer is receiving is HTML.
You CANNOT double click on the file.
You CANNOT use file/open to view the file.
The ONLY way you can run the PHP is by calling it via HTTP
ie. http://localhost/index.php