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
Delete a file not working...
Moderator: General Moderators
- aceconcepts
- DevNet Resident
- Posts: 1424
- Joined: Mon Feb 06, 2006 11:26 am
- Location: London
Re: Delete a file not working...
Are you running a virtual server?
Because you using different slashes!
Because you using different slashes!
Re: Delete a file not working...
Oh i sorted it, there was an error with my variable!