Delete a file not working...
Posted: Sat Apr 26, 2008 4:35 pm
I am new to php and just can't figure out this problem. I have some code which uploads a series of jpegs to a directory eg uk/image.jpg. That is working fine. I now want to delete the image.jpg with some code.
Here is the bit of code:
$thumb_del = "uk/image.jpg";
unlink ($image_del);
It isn't working. My error says [26-Apr-2008 22:28:47] PHP Warning: unlink(uk/12.jpg) [<a href='function.unlink'>function.unlink</a>]: No such file or directory in C:\where-my-files-are\delete_image.php on line 40
I don't understand as it does exist! Any ideas?
Thanks
Here is the bit of code:
$thumb_del = "uk/image.jpg";
unlink ($image_del);
It isn't working. My error says [26-Apr-2008 22:28:47] PHP Warning: unlink(uk/12.jpg) [<a href='function.unlink'>function.unlink</a>]: No such file or directory in C:\where-my-files-are\delete_image.php on line 40
I don't understand as it does exist! Any ideas?
Thanks