$sour开发者_高级运维ce="/Filelist/"
$filter = new Zend_Filter_Compress(
array(
'adapter' => 'Zip',
'options' => array(
'archive' => test.zip
)
)
);
$result = $filter->filter($source);
the function work fine ,the problem is that i want to get the file list inside the test.zip .but now i am getting the folder Filelist inside the archive.
it seems to because of line $content = str_replace(array('/', '\'), DIRECTORY_SEPARATOR, realpath($content)); and the realpath is removing '/' Any solution ????????????????
Looking at the code, I don't see a way of doing that. Zend_Filter_Compress_Zip checks if it is a dir, and if it is, calls:
$zip->addEmptyDir(substr($local, 0, -1));
精彩评论