开发者

how to get files inside the folder to be zip Archive

  $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));
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜