|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2019-09-10 03:26 UTC] 77738609 at qq dot com
[2019-09-10 05:40 UTC] requinix@php.net
-Status: Open
+Status: Not a bug
-Package: *URL Functions
+Package: *General Issues
[2019-09-10 05:40 UTC] requinix@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 08 16:00:01 2026 UTC |
Description: ------------ php download file name '≈你 好;123.zip'; file name is &ap c# can download Test script: --------------- php download file name '≈你 好;123.zip'; $filename = iconv('utf-8',"gbk//IGNORE",$filename); $filepath = 'D:/www/'.$filename; $file=fopen($filepath,"r"); header("Content-type:text/html;charset=utf-8"); header("Content-Type: application/octet-stream"); header("Accept-Ranges: bytes"); header("Accept-Length: ".filesize($filepath)); header("Content-Disposition: attachment; filename= $filename ; filename*=utf-8''$filename "); echo fread($file,filesize($filepath)); fclose($file); Expected result: ---------------- php download file name '≈你 好;123.zip'; Actual result: -------------- php download file name '≈你 好;123.zip';