Jump to content

Archived

This topic is now archived and is closed to further replies.

j4mes_bond25

How to open PHP file ???

Recommended Posts

After formatting my laptop's harddrive, I have to reinstall PHP setup. Earlier a friend of mine did it, which was working perfectly well. But now, I've used the software "XAMPP" which contains PHP, MySQL along with Apache server.

However, this time I used XAMPP & in it's control window, Apache, MySQL and FireZilla are all running & hence I believe the installation went successful.

I now want to open my PHP files. The program's instruction say that All the documents should be saved in folder ".\xampp\htdocs" [a href=\"http://www.apachefriends.org/en/xampp-windows.html#1168\" target=\"_blank\"]http://www.apachefriends.org/en/xampp-windows.html#1168[/a]
I saved my website's folder i.e. "Personal Website" folder in the location c:/program files/xampp/htdocs"

Problem is everytime, I try to open the document in the browser, I get the message window asking "What should Firefox do with this file? with couple of option saying "Open with: phpfile (default) or Save to disc" & when I say OK for "open with "phpfile (default)" it opens its "coding" in my Dreamweaver instead of its "result" in the web browser.

Could anyone possibly point me in the right direction as how do I go about opening my PHP pages as I was able to earlier.

Share this post


Link to post
Share on other sites
How are you trying to display the page now? The correct way is via a UTL specifying the localhost as the server:
[a href=\"http://localhost/Personal%20Website/yoursource.php\" target=\"_blank\"]http://localhost/Personal%20Website/yoursource.php[/a]

Ken

Share this post


Link to post
Share on other sites
Most likely the server is misconfigured.
Try to edit the .htaccess and add a line like:

[code]AddType application/x-httpd-php .php[/code]
or
[code]AddHandler php-script php[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.