Permalink
Browse files

making multibyte filename appear correctly under IE download

  • Loading branch information...
toyomoyo
toyomoyo committed Oct 30, 2007
1 parent 24ec59c commit f3768c409401052ba7ed57b665d81639564eb78d
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/filelib.php
View
@@ -341,6 +341,11 @@ function send_file($path, $filename, $lifetime=86400 , $filter=0, $pathisstring=
//TODO: should we remove all those @ before the header()? Are all of the values supported on all servers?
header('Last-Modified: '. gmdate('D, d M Y H:i:s', $lastmodified) .' GMT');
// if user is using IE, urlencode the filename so that multibyte file name will show up correctly on popup
if (check_browser_version('MSIE')) {
$filename = urlencode($filename);
}
if ($forcedownload) {
@header('Content-Disposition: attachment; filename='.$filename);
} else {

0 comments on commit f3768c4

Please sign in to comment.