Can someone help me to unzip the newest zip file in a directory.
I can unzip a file using the specific file name, but unfortunately, the file name changes daily. So unzipping the latest file is my best option.
Or
Can someone show me how to unzip a zip file using the *.zip wildcard and then delete the zip file.
I have tried using the wildcard to unzip, but the wildcard doesn't work for the initial unzip.
$zip = new ZipArchive;
$res = $zip->open('/home/*.zip');
if ($res === TRUE) {
$zip->extractTo('/home/');
$zip->close();
echo 'woot!';
} else {
echo 'doh!';
}