Reply to Re: Strange download script problem

Your name:

Reply:


Posted by dourdoun@gmail.com on 07/29/07 13:21

This is similar to your case:

http://in.php.net/manual/en/function.header.php#73416

On Jul 29, 10:46 am, Raffi <thegrizz...@yahoo.com> wrote:
> I have a php script which generates a zip file that contains an ASCII
> text file. The script then prompts the user to save/open the zip file.
> The script is on a server that is behind an Apache proxy server. Using
> Firefox, the download works fine and everything goes as intended.
> However, IE7 tries to download the php script instead of the zip file,
> resulting in an access error.
>
> Below are the pertinent portions of the script.
>
> Any help is greatly appreciated.
>
> Raffi
>
> --------------------------------------------------------------------------------------------------------
>
> $file_name = "/tmp/Export.zip";
>
> $size = filesize($file_name);
>
> //Set headers
> header("Cache-Control: public");
> header("Content-Description: File Transfer");
> header("Content-Disposition: attachment; filename=Export.zip");
> header("Content-Length: $size");
> header("Content-Type: application/zip");
> header("Content-Transfer-Encoding: binary");
>
> //Read the file from disk
> readfile($file_name);

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация