Home > Backend Development > PHP Problem > PHP download file cannot be decompressed

PHP download file cannot be decompressed

王林
Release: 2023-02-27 14:50:01
Original
3644 people have browsed it

PHP download file cannot be decompressed

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下必须开转码,不然直接文件不存
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template