Phpexcel Export Chinese file name error
Header ("Content-disposition:attachment;filename= $filename");
$filename is Chinese words downloaded to the file is. php in English can
------to solve the idea----------------------
Give it a try
$user _agent = $_server[' http_user_agent ');
if (Preg_match ("/msie/", $user _agent)) {
Header (' content-disposition:attachment; filename= '. $encode _filename. ');
}else if (Preg_match ("/firefox/", $user _agent)) {
Header ("content-disposition:attachment; Filename*=\ "UTF8". $filename. ' "');
}else{
Header (' content-disposition:attachment; Filename= '. $filename. ');
}
------to solve the idea----------------------
1, header ("Content-disposition:attachment;filename= $filename"); Must be a pure file name without a path
2, Phpexcel The default character set is Utf-8, the General people use a waste of resources Utf-8 save program Files. It's inevitable that there may be BOM header