note 109302 added to function.header

From: Date: Wed, 04 Jul 2012 13:03:53 +0000
Subject: note 109302 added to function.header
Groups: php.notes 
Request: Send a blank email to php-notes+get-189026@lists.php.net to get a copy of this message
A proper way to encode a filename in Content-Disposition header is described in RFC 5987. However, that is not supported in IE below 9, so you need a fallback. You can not send two Content-Disposition headers, but you can set two filename attributes: <?php $simple = 'file.jpg'; $fancy = 'my € balance ¤ ½.jpg'; header('Content-Disposition: attachment; filename='.$simple.'; filename*=utf-8\'\''.rawurlencode($fancy)); ---- Server IP: 69.147.83.197 Probable Submitter: 95.97.19.116 ---- Manual Page -- http://www.php.net/manual/en/function.header.php Edit -- https://master.php.net/note/edit/109302 Del: integrated -- https://master.php.net/note/delete/109302/integrated Del: useless -- https://master.php.net/note/delete/109302/useless Del: bad code -- https://master.php.net/note/delete/109302/bad+code Del: spam -- https://master.php.net/note/delete/109302/spam Del: non-english -- https://master.php.net/note/delete/109302/non-english Del: in docs -- https://master.php.net/note/delete/109302/in+docs Del: other reasons-- https://master.php.net/note/delete/109302 Reject -- https://master.php.net/note/reject/109302 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#189026) next »