php壓縮shell格式化
最近通過shell_exec執行zipinfo命令,得到對應的zip壓縮包裡面的檔案清單資訊,返回的是字串,如何格式化輸出傳回值為數組形式?
Archive: 222.zip
Zip file size: 1358592 bytes, number of entries: 69
-rw---- 6.3 fat 33897 bx defN 12-Jul-09 23:47 PEAR.php
-rw---- 6.3 fat 34308 bx defN 12-Jul-09 23:47 chmod.define
-rw---- 6.3 fat 2102 bx defN 12-Jul-09 23:47 chmod.php
-rw---- 6.3 fat 32 bx stor 12-Jul-09 23:47 config.php
-rw---- 6.3 fat 2356 bx defN 12-Oct-17 04:02 copy.php
-rw---- 6.3 fat 1991 bx defN 12-Jul-09 23:47 delete.php
-rw---- 6.3 fat 1659 bx defN 12-Jul-09 23:47 dirinfo.php
-rw---- 6.3 fat 371 bx defN 12-Jul-09 23:47 download.php
-rw---- 6.3 fat 1807 bx defN 12-Jul-09 23:47 editor.php
-rw---- 6.3 fat 609 bx defN 12-Jul-09 23:47 exit.php
-rw---- 6.3 fat 2788 bx defN 12-Sep-23 10:50 fileinfo.php
-rw---- 6.3 fat 3525 bx defN 12-Oct-17 03:46 function.php
drwx--- 6.3 fat 0 bx stor 16-Jan-25 09:54 geshi/
-rw---- 6.3 fat 16993 bx defN 12-Jul-09 23:47 geshi/apache.php
-rw---- 6.3 fat 6038 bx defN 12-Jul-09 23:47 geshi/asp.php
-rw---- 6.3 fat 10457 bx defN 12-Jul-09 23:47 geshi/c.php
-rw---- 6.3 fat 10103 bx defN 12-Jul-09 23:47 geshi/cpp.php
-rw---- 6.3 fat 9900 bx defN 12-Jul-09 23:47 geshi/css.php
-rw---- 6.3 fat 3016 bx defN 12-Jul-09 23:47 geshi/gettext.php
-rw---- 6.3 fat 6824 bx defN 12-Jul-09 23:47 geshi/html4strict.php
-rw---- 6.3 fat 7975 bx defN 12-Jul-09 23:47 geshi/html5.php
-rw---- 6.3 fat 50326 bx defN 12-Jul-09 23:47 geshi/java.php
22 files, 3552318 bytes uncompressed, 1349142 bytes compressed: 62.0%