I have this piece of code to tidy up after a function that calls move_uploaded_f ile()
Basically I am attempting to delete a file from a
move_uploaded_f ile() 'destination' so that the file can upload. This piece of code returns TRUE but the file is still there
I am running Apache Windows with IE which I suspect is the issue.
Or am I completely mis-understanding unlink()?
By the way it is a CSV file.
Code:
if(file_exists($destination.$filename))
{
$exitmsg .=
"<br>File still in temporary location
<br>$filename
<br>Attempting deletion ";
if(unlink($destination.$filename))
$exitmsg .= '<br>Success deleting. Please try again ';
else
$exitmsg .= '<br>Failed deleting. Please inform IT';
}
move_uploaded_f ile() 'destination' so that the file can upload. This piece of code returns TRUE but the file is still there
Code:
if(unlink($destination.$filename))
Or am I completely mis-understanding unlink()?
By the way it is a CSV file.
Comment