I use PHP zip function to extract files from a zip file
$zip = new ZipArchive;
if($zip -> open ($filezip) === TRUE ) {
$mani = $zip -> getFromName('MANIFEST.MF');
echo $mani;
}
This script will extract the file MANIFEST.MF, but i have a problem, that if i rename this file to MANIFEST.Mf or mANIFEST.MF (with lowercase) from the zip file, it couldn’t be extracted
Please help me to fix this code.Thanks
ZipArchivetreats filenames from the archive case-sensitive, as do most Unixziputilities. So does->getFromName()You can only influence that behaviour for
->locateName()with theZIPARCHIVE::FL_NOCASEflag.