我有一个zip压缩包,解压后需要检查其中是否存在moduleConfig.xml文件。我该如何实现?
我尝试过以下方法:
我尝试过以下方法:
$zip = new ZipArchive();
if($zip->open('test.zip') === TRUE )
{
if(file_exists($zip->getFromName('moduleConfig.xml')))
{
echo "Config exists";
// Do somthing
}
}
else {
echo 'Failed code:'. $res;
}