Re: .php file extension in browsers
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: .php file extension in browsers

From: Malcolm Dew-Jones <yf110@vtn1.victoria.tc.ca>
Date: Tue Oct 04 2005 - 05:11:23 CEST

Oli Filth (catch@olifilth.co.uk) wrote:
: Rationem said the following on 03/10/2005 23:45:
: > Not true.
: >
: > Although the PHP is parsed through the server, a file with the
: > (generally) 'php' extension is sent to the client with HTML.
: >
: > IE understands that the .php extension contains HTML markup (as
: > processed by the server).
: >
: > By the same token, IE knows that (for instance) .jpg is not going to
: > look pretty in ASCII so it shows a download box.
: >
: > Opera believes that PHP files are not viewable and, therefore, is
: > offering you the chance to download it.
: >

: Well, that's gibberish...

That's not gibberish at all.

And in fact may entirely explain the problem.

If the output of the php script is sent as "content-type: something/odd"
then opera would correctly display a download dialog, whereas explorer
would likely ignore the content-type and use the file extension plus what
it "sees" in the data to guess it is supposed to be text/html and so
display it.

That's the well known behaviour of IE, and a well known difference between
IE and some other browsers.

Whether that is what is happening here, who knows...?

--
This programmer available for rent.
Received on Tue Oct 18 02:31:13 2005