note 22904 added to function.header

From: Date: Wed, 03 Jul 2002 18:34:55 +0000
Subject: note 22904 added to function.header
Groups: php.notes 
Request: Send a blank email to php-notes+get-32558@lists.php.net to get a copy of this message
To krynix@wp.pl: You simply aren't using Content-Disposition correctly. That header tells the browser what filename to use when it processes the output of your PHP script. Since your PHP script outputs nothing, the browser has nothing to process. Hence, it is in fact behaving according to spec. To make your example work, change the Content-Disposition header to just "filename=$file" and add some lines like this: $fp = fopen($file, 'r'); fpassthru($fp); fclose($fp); -- http://www.php.net/manual/en/function.header.php http://master.php.net/manage/user-notes.php?action=edit+22904 http://master.php.net/manage/user-notes.php?action=delete+22904 http://master.php.net/manage/user-notes.php?action=reject+22904

« previous php.notes (#32558) next »