Reason:
The default character set of the windows system is gbk, the project uses uft8 encoding, and Chinese file names must be transcoded to use file_exists Check the file, otherwise it will report that the file cannot be found.
The solution under windows is to open the section noted above:
$file_name = iconv("utf-8","gbk//IGNORE",$file_name); // 特别注意!特别注意! 特别注意这里,windows下必须开转码,不然直接文件不存
Recommended tutorial: PHP video tutorial
The above is the detailed content of PHP download file cannot be decompressed. For more information, please follow other related articles on the PHP Chinese website!