【发布时间】:2013-06-26 14:46:50
【问题描述】:
我有这个代码:
$za = new ZipArchive();
$za->open($downloadlink);
echo "Number of files inside Zip = Unknown";
for( $i = 0; $i < $za->numFiles; $i++ ){
$stat = $za->statIndex( $i );
$tounes = array( basename( $stat['name'] ) . PHP_EOL );
foreach($tounes as $toune) {
echo $toune;
}
}
我想在显示列表之前显示存档中的文件数。我该怎么做?
【问题讨论】:
-
供将来参考,Google 是一个很棒的工具:php.net/manual/en/class.ziparchive.php