<?php
function unzip($filename){
$zip = new ZipArchive();
$zip->open($filename);
$path="./test/";
$zip->extractTo($path);
}
unzip('test.zip')
?>
ZipArchive() 是PHP内置类
$zip->open($filename); // 打开一个压缩文件 后缀不一定是zip 可以为任意后缀
$zip->extractTo($path); // 开始解压文件到$path 下
如果 没有验证解压后的文件 就会造成GETSHELL
如果 是先解压 再验证 也会造成GETSHELL
还有目录穿越也会造成getshell