Home › Forums › Back End › PHP unlink() issue › Re: PHP unlink() issue
July 18, 2011 at 8:17 pm
#83585
ddliu
Member
Make sure you get the right path to the file.
It’s a better practice to always use ABSOLUTE path.
Try to print the path and check if it does exist:
$file_path=$_SERVER . str_replace("http://www.url.com","",$films);
echo $file_path;
echo '
';
var_dump(file_exists($file_path));
BTW, it’ll be helpful if you can show your PHP error.