Hi, $writezip =newZipArchive; if($writezip->open('test.zip')===TRUE){ if($zip->addEmptyDir('newDirectory')){ $writezip->addFile('/path/to/index.txt','newDirectory/newname.txt'); $writezip->close(); echo 'ok'; } else{ echo 'failed to create directory'; } } else{ echo 'failed'; } Files are zipped but When I am going to extract files it saying files are corrupted and I can not open file. Can anyone help? Using php 5. [Non-text portions of this message have been removed]