note 110249 added to function.header

From: Date: Thu, 04 Oct 2012 21:17:27 +0000
Subject: note 110249 added to function.header
Groups: php.notes 
Request: Send a blank email to php-notes+get-191135@lists.php.net to get a copy of this message
Before it was pointed out that there are problems with Content-Disposition and using UTF-8 filenames. The proposed solutions was <?php $simple = 'file.jpg'; $fancy = 'my € balance ¤ ½.jpg'; header('Content-Disposition: attachment; filename='.$simple.'; filename*=utf-8\\'\\''.rawurlencode($fancy)); ?> but this can lead to problems. For example, if you use % in the filename, it gets converted to %25, but Internet Explorer (v.9) does not decode that. It works for Chrome however. ---- Server IP: 69.147.83.199 Probable Submitter: 213.142.180.164 ---- Manual Page -- http://www.php.net/manual/en/function.header.php Edit -- https://master.php.net/note/edit/110249 Del: integrated -- https://master.php.net/note/delete/110249/integrated Del: useless -- https://master.php.net/note/delete/110249/useless Del: bad code -- https://master.php.net/note/delete/110249/bad+code Del: spam -- https://master.php.net/note/delete/110249/spam Del: non-english -- https://master.php.net/note/delete/110249/non-english Del: in docs -- https://master.php.net/note/delete/110249/in+docs Del: other reasons-- https://master.php.net/note/delete/110249 Reject -- https://master.php.net/note/reject/110249 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#191135) next »