<?php $zip = new ZipArchive; if ($zip->open('test1.zip') === TRUE) { $zip->deleteName('testfromfile.php'); $zip->close(); echo 'ok'; } else { echo 'failed'; }?>