Page 1 of 1

ZipArchive::deleteIndex not working?

Posted: Sun Sep 20, 2009 10:40 am
by harryd
I'm having problems maintaining a ZIP archive. Deleted entries are not deleted. Any help is appreciated.
<?php
$fname='somefile.txt';
$z=new ZipArchive;
$z->open('somearchive.zip');

echo "<p>before: ".$z->getFromName($fname); // shows the contents as expected
$res=$z->deleteName($fname); // $res is true!
echo "<p>after: ".$z->getFromName($fname); // shows no content, as expected
$z->close;

$z=new ZipArchive;
$z->open('somearchive.zip');
echo "<p>and again: ".$z->getFromName($fname); // shows contents. Quite unexpected.
$z->close;
?>
I am running latest XAMPP on WInXP3.

Thanks!

HarryD