setting the name of the file in Save As windows

From: Date: Thu, 26 Apr 2001 22:18:06 +0000
Subject: setting the name of the file in Save As windows
Groups: php.general 
Request: Send a blank email to php-general+get-50516@lists.php.net to get a copy of this message
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?

« previous php.general (#50516) next »