j4mes_bond25 Posted June 8, 2006 Share Posted June 8, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/11496-how-to-open-php-file/ Share on other sites More sharing options...
kenrbnsn Posted June 8, 2006 Share Posted June 8, 2006 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 Quote Link to comment https://forums.phpfreaks.com/topic/11496-how-to-open-php-file/#findComment-43248 Share on other sites More sharing options...
poirot Posted June 8, 2006 Share Posted June 8, 2006 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] Quote Link to comment https://forums.phpfreaks.com/topic/11496-how-to-open-php-file/#findComment-43277 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.