php_zip not working
Posted: Wed Apr 11, 2007 10:56 am
feyd | Please use
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I've the following code, but when I ran the script, it doesn't seem to work. Does anyone know why? Please see output below. Thanks,
ZipArchive Object (
[status] => 0
[statusSys] => 0
[numFiles] => 0
[filename] =>
[comment] =>
)
object(ZipArchive)#1 (5) {
["status"]=> int(0)
["statusSys"]=> int(0)
["numFiles"]=> int(0)
["filename"]=> string(0) ""
["comment"]=> string(0) ""
}
numFiles: 0
status: 0
statusSys: 0
filename:
comment:
numFile:0Code: Select all
<?php
$za = new ZipArchive();
$za->open('test.zip');
print_r($za);
var_dump($za);
echo "numFiles: " . $za->numFiles . "\n";
echo "status: " . $za->status . "\n";
echo "statusSys: " . $za->statusSys . "\n";
echo "filename: " . $za->filename . "\n";
echo "comment: " . $za->comment . "\n";
for ($i=0; $i<$za->numFiles;$i++) {
echo "index: $i\n";
print_r($za->statIndex($i));
}
echo "numFile:" . $za->numFiles . "\n";
?>feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]