If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > PHP > PHP files not opening in Browser

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-26-11, 18:40
xuhaib xuhaib is offline
Registered User
 
Join Date: May 2011
Posts: 6
PHP files not opening in Browser

This is rather unbelievable for me. I have Wamp installed. PHP files were working fine until now. But suddenly there is some problem with it.

Whenever I try to open a file in browser, it pops up a window asking if I want to "Save File" or "Open With". If I select to "Open With" Firefox, it opens another firefox tab with the same pop up window.

Firefox is set as default browser for Wamp.

HELP ME OUT PLEASE.
Reply With Quote
  #2 (permalink)  
Old 05-29-11, 23:38
Serien Serien is offline
Registered User
 
Join Date: May 2011
Posts: 4
Are you going in through the C drive and trying to open the files? Or straight through the wamp server?

If you haven't already, try using the "Localhost" link that is at the top of the Wamp menu. Then find your pages through that. It works a lot more smoothly than any other method.
Reply With Quote
  #3 (permalink)  
Old 05-30-11, 06:31
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,262
opening a file from the file browser will not interpret the PHP and render it as HTML. to do that you MUST open the file in the (internet) browser, and further more it needs to be specified as a web page not a file location

eg http://localhost/path/to/file/filename.ext
as opposed to
c:/path/to/file/filename.ext

if you try to open the file in your internet browser as an absolute path to the file as opposed to a web page it will bot go through the web server. the server interprets the PHP and renders HTML data to the (internet) browser.
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On