I want to unlink (delete) my temporary file but php throws the error:
Warning Error: Unlinking ("my file path"\Temp\TMPAF91.tmp): ["my file path"\myscript resources in Temporarily unavailable.php, line "number"]
$tmpfile = tempnam(sys_get_temp_dir(), 'zipfile'); file_put_contents($tmpfile, $content); $zip = new ZipArchive; if ($zip->open($tmpfile) === true) { // my code in here to extract the $content of the $tmpfile $zip->close(); } unlink($tmpfile);
I'm not sure what's going on here. ZipArchive is down, so I should definitely be allowed to unlink.
This error only occurs on my Windows computer (version 10 in Mamp settings).
On my Linux server (Debian Jessie distribution). This works very well.
It also works fine on my Mac (Catalina in Mamp settings).