$fver = str_replace(".","a",$arrMatches[1]);
$download = "ENU2v" . $fver . ".zip";
$zip = new ZipArchive;
if ($zip->open($download, ZipArchive::CREATE) !== TRUE)
{
die ("An error occurred creating your ZIP file.");
}
以下代码因问题标题中的错误而失败。 但是,如果我们将第一行更改为:
$download = "ENU2v.zip";
然后它确实有效。错误在哪里?出了什么问题?
答案 0 :(得分:1)
执行:
$fver = str_replace(".","a",$arrMatches[1]);
$download = "ENU2v" . $fver . ".zip";
$zip = new ZipArchive;
$res = $zip->open($download, ZipArchive::CREATE);
if ($res !== TRUE) {
die ("An error occurred creating your ZIP file. Code: " . $res);
}
错误代码是什么?
错误代码: