Hi!

I've done a program that send a zip file to browser. I read it on server
using fopen because I've it in a private area (I can't send it directly).

Now I send it to browser in this way:

  header ("Content-type: application/x-zip-compressed");
 $fd = fopen ($filename, "r");
  $data = fread( $fd , filesize ($filename));
  echo ($data);
 fclose ($fd);


This work, but when the user tries to save the file on his disk the script
set as file name the name of itself!

I've tried unsuccesfully to print this header after the first header:

header ("Content-Disposition: attachment; filename=\"WorkPlease.zip\"");

Can you help me?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to