I have a zip file called project.zip with the following structure:
project.zip
\project
\file.pdf
I need to delete file.pdf. I tried the following code but I'm getting an error.
Thanks
$zip = new ZipArchive();
$zip_name = 'path\to\project.zip';
$zip->open( $zip_name );
$zip->deleteName( 'project\file.pdf' );
$zip->close();
I Also tried with a leading backslash but with no success,
$zip->deleteName( 'prject\file.pdf' );