Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End PHP unlink() issue Re: PHP unlink() issue

#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.