Re: Corrupted ZIP files (downloaded via a php script) : Internext Explorer 7

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 7:42 PM -0400 7/16/08, robert mena wrote:
Am I doing something wrong or do I have to start looking to the server's
configuration (like mod_deflate)?


I use this -- it seems to work:

$file="test.zip";
header("Content-type: application/octet-stream");
header("Content-Transfer-Encoding: Binary");
header("Content-length: ".filesize($file));
header("Content-disposition: attachment; filename=\"".basename($file)."\"");
readfile("$file");

Anyone see a problem with it?

Cheers,

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux