So I want to do stuff with an csv-file that's uploaded from my computer. However it's not necessary to keep the file after I used it, so I try to just use the temporary file.
if (isset($_FILES['file'])) {
$savepath = sys_get_temp_dir() . $_FILES['file']['tmp_name'];
doStuff($savepath);
}
I get a warning: ...\Temp\php8CC0.tmp): failed to open stream: Invalid argument. Any idea what the problem could be, or is it just not recommended to work with the temporary files?