[英]Why does maxpathlen error occur during zip->extractto?
I'm using standard php coding to unzip a file on a PC xampp installation, so paths are formatted as C:/ProgramData/etc...我正在使用标准 php 编码在 PC xampp 安装上解压缩文件,因此路径格式为 C:/ProgramData/etc...
$zip = new ZipArchive;
$res = $zip->open($zipFile);
if ($res === TRUE) {
$zip->extractTo($tempPath);
$zip->close();
}
The unzip never completes and the following warning arises:解压缩永远不会完成,并出现以下警告:
Warning: ZipArchive::extractTo(): Full extraction path exceed MAXPATHLEN (260)
While the zip file contains lots of files and folder levels around 8 deep, the longest path names top out at around 150 chars.虽然 zip 文件包含大量文件和文件夹级别约为 8 层,但最长的路径名最多约为 150 个字符。 Can anyone explain what this error really means?
谁能解释这个错误的真正含义?
Solved: Turns out $tempPath, which also had a few levels, when shortened to simply "temp/", allowed the unzip to complete.已解决:原来 $tempPath,它也有几个级别,当简称为“temp/”时,允许解压缩完成。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.