note 70570 added to function.header

From: Date: Fri, 20 Oct 2006 16:26:10 +0000
Subject: note 70570 added to function.header
Groups: php.notes 
Request: Send a blank email to php-notes+get-118859@lists.php.net to get a copy of this message
For those having the problem with IE adding underscores to spaces... here's a workaround: $filename = 'test file with spaces.txt'; if(stristr($_SERVER['HTTP_USER_AGENT'],'MSIE') !== FALSE) { $filename = str_replace(' ','%20',$filename); // replace space with %20 so IE will read it as a space } header('Content-Disposition: attachment; filename="'.basename($filename).'";'); readfile($fileLocation); ---- Server IP: 203.220.0.234 Probable Submitter: 211.28.221.3 ---- Manual Page -- http://www.php.net/manual/en/function.header.php Edit -- https://master.php.net/note/edit/70570 Del: integrated -- https://master.php.net/note/delete/70570/integrated Del: useless -- https://master.php.net/note/delete/70570/useless Del: bad code -- https://master.php.net/note/delete/70570/bad+code Del: spam -- https://master.php.net/note/delete/70570/spam Del: non-english -- https://master.php.net/note/delete/70570/non-english Del: in docs -- https://master.php.net/note/delete/70570/in+docs Del: other reasons-- https://master.php.net/note/delete/70570 Reject -- https://master.php.net/note/reject/70570 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#118859) next »