PDA

Click to See Complete Forum and Search --> : PHP Files on Non-PHP Server


squirrelly1
Jun 16th, 2005, 01:01 PM
I'm working on some php stuff on my local computer. Of course, my machine is not running any type of web or PHP server.

This is more of an annoyance than a problem, but every time I highlight or open one of my main files that opens another PHP file, IE tries to make my download the file instead of just saying that it can't read the file... or displaying its text or anything...

How can I keep it from doing this? Is there any way to set the MIME types in my browser to ignore the downloading of PHP files and just let the computer go about its business?

Thanks,

Squirrelly1

ALL
Jun 16th, 2005, 03:08 PM
try setting the *.php extension to internet explorer and then try it... (not sure if it will do what you want)

if you are running apache with php, you can have the php file tell the browser to view the file, rather than downloading it, by doing somthing like:
header("HTTP/1.0 204 No Response");

bind
Jun 21st, 2005, 11:11 PM
I am guessing that you are opening HTM-HTML files locally on a machine with no server script running and they are calling php scripts that only show up as downloads ... is this correct ?

no there isn't any way to do that without a server script enterpreting the requests and associated sripts/file extensions to the appropriate application ...

you can always work out of the path other than where the PHP files are stored, so when called upon the browser/system wont be able to find them to open the download popup.

you can TRY setting php file associations in your file manager to your text editor application of preference and see if that helps, but i never had this problem so i have no idea if it will work.

of course as alast resort, you can always run a HTTPD DEV Server with PHP mod and work from there locally, then the files will parse and path correctly as intended. This is what i do for DEV purposes before I upload into production.

ALL
Jun 22nd, 2005, 09:23 PM
oops, after re-reading my post, i screwed up, i ment:
header("Content-type: text/html");