|
-
Jun 16th, 2005, 01:01 PM
#1
Thread Starter
Frenzied Member
PHP Files on Non-PHP Server
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
Now happily married and still crankin' away at the keyboard.  Life is grand for a coder, no?
-
Jun 16th, 2005, 03:08 PM
#2
Fanatic Member
Re: PHP Files on Non-PHP Server
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:
PHP Code:
header("HTTP/1.0 204 No Response");
Last edited by ALL; Jun 16th, 2005 at 03:11 PM.
-
Jun 21st, 2005, 11:11 PM
#3
New Member
Re: PHP Files on Non-PHP Server
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.
-
Jun 22nd, 2005, 09:23 PM
#4
Fanatic Member
Re: PHP Files on Non-PHP Server
oops, after re-reading my post, i screwed up, i ment:
PHP Code:
header("Content-type: text/html");
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|