Home › Forums › Back End › PHP unlink() issue › Re: PHP unlink() issue
July 18, 2011 at 11:23 pm
#83599
nchipping
Member
@ddliu – I don’t think you read my original post – I DID try using the $_SERVER, but with no success. I have tried multiple things – the file DOES exist (it’s being used in multiple places on the site), but I want the user to have the option to delete it. The error I get says:
Warning: unlink(/home/syxbit/public_html/mysite.net/upload/uploads/images/Flip Flops.png
) [function.unlink]: No such file or directory in /home/syxbit/public_html/mysite.net/edit_videos.php on line 27
The output of:
echo $_SERVER . str_replace("http://www.mysite.net","",$films);
is exactly the path in the unlink.
Any other ideas?