note 52921 added to function.readfile

From: Date: Tue, 17 May 2005 18:21:05 +0000
Subject: note 52921 added to function.readfile
Groups: php.notes 
Request: Send a blank email to php-notes+get-89559@lists.php.net to get a copy of this message
I saw in previous contributed notes that in content-disposition the file is not a quoted-string, there is no problem if the filename have no spaces but if it has in IE it works but in Firefox not. The RFC 2616 puts as an example this: Content-Disposition: attachment; filename="fname.ext" You can see http://www.faqs.org/rfcs/rfc2616.html section "19.5.1 Content-Disposition" for more details. The correct header then is this: header("Content-Disposition: attachment; filename=\"$filename\""); ---- Manual Page -- http://www.php.net/manual/en/function.readfile.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+52921 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+52921&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+52921&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+52921&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+52921&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+52921&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+52921&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#89559) next »