Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
|
You cannot store a future call to a function in a variable...
What you do here, is that you store the returned value of the command you called, which is either TRUE or FALSE, depending if the file could be deleted or not.
Call the function when you need it, or create a "wrapper" function that you will call later.
PHP Code:
function myDel($file, $thumb){ $ret=false; $ret=unlink($file); if($ret===TRUE){ $ret=unlink($thumb); } return $ret; }
__________________
Only a biker knows why a dog sticks his head out the window.
|