Re: File download

From: Date: Mon, 12 Mar 2001 15:00:42 +0000
Subject: Re: File download
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-5965@lists.php.net to get a copy of this message
Hi,
        I believe your problem is related to the fact that you use "unknown" in your content-type header. This forces IE to search for an application to open the file of "unknown" type. Have you tried any other content-types?
For more info on content-types, see the HTTP1.1 RFC: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17 Olivier Hubert
Hi, I'm using following code to download a file. IE5 shows the Open/Save dialogue, if I select 'Save", it works. But if I select "Open", it again shows the same dialog with the name of my .php file. Now if I say open, it opens a blank file. Can anybody help me?
        header("Content-type: unknown");
        header("Content-Disposition: attachment; filename=$name;");
        readfile($name);
Regards,       | Linux
Urmil Parikh | It is now safe to turn on your computer


« previous php.windows (#5965) next »