我正在使用 jQuery 和https://github.com/jfeldstein/jQuery.AjaxFileUpload.js发布我的文件,并尝试使用以下 php 解压缩:
if($_FILES["folder"]["name"]) {
$filename = $_FILES["folder"]["name"];
$source = $_FILES["folder"]["tmp_name"];
$type = $_FILES["folder"]["type"];
$zip = new ZipArchive;
$res = $zip->open($source);
if ($res === TRUE) {
$zip->extractTo('themes');
$zip->close();
echo 'Unzip was successful';
} else {
echo 'Unzip was not successful';
}
} else {
echo "NOT SET";
}
Firebug 控制台返回“解压缩成功”但主题文件夹中没有创建文件夹。谁能建议为什么这不创建文件夹?