note 45842 added to function.readfile
| From: | shadow at la3 dot org | Date: | Tue, 21 Sep 2004 10:21:45 +0000 |
| Subject: | note 45842 added to function.readfile | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-77094@lists.php.net to get a copy of this message | ||
Don't forget the colons arround the filename, or it will be cut if there are spaces:
// Suppose
$file = "a file with spaces.txt";
header("Content-Disposition: attachment; filename=".basename($file));
// User will get file "a"
header('Content-Disposition: attachment;
filename="'.basename($file).'"');
// User will get file "a file with spaces.txt"
----
Manual Page -- http://www.php.net/manual/en/function.readfile.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+45842
Delete -- http://master.php.net/manage/user-notes.php?action=delete+45842&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+45842&report=yes
Search -- http://master.php.net/manage/user-notes.php