======php Download Function ======
Header (' CONTENT-TYPE:VIDEO/MPEG4 ');//type of output
Header (' content-disposition:attachment; filename= ' filename. mp4 "'); Download the displayed name
ReadFile (' filename. mp4 ');
?>
This is the download code I'm using.
However, when the file name is in Chinese, the download box and the downloaded file display the name is garbled.
is PHP in this download feature does not recognize Chinese?
How should this PHP download function be modified to properly download files with Chinese name?
PHP Header Download
------Solution--------------------
Whether the garbled display is related to the default character set of the user's operating system
------Solution--------------------
Header ("content-type:text/html; Charset=utf-8 ");
------Solution--------------------
First read the file name to Url_encode transcoding and then execute the download program
------Solution--------------------
Two upstairs is to mess up the ha haha ~
------Solution--------------------
You look at your PHP file format, file format and code format consistent or it will be garbled
Your php file is UTF8 words you add this bureau header ("content-type:text/html; Charset=utf-8 "); top
------Solution--------------------
You can transfer your download file name Iconv () to the next test