Delete image from folder inside of the server
hi everyone.
i searched about how i can remove a image in a folder inside of my server, i saw that i can use unlink() but it is not working i have the right directory and all the permissions and it says:
Warning: unlink(URL): No such file or directory in /var/www/some name/some name/social/some name.php on line 33
and the line 33 have unlink(URL).
Anyone can give me some help?
Thanks community
Perhaps you need to start from the root?
home/var/www/...etc.
Or no leading slash.
I think you have two ways to go; a relative path from the directory the php file is to the image file, or a full path to the image file such as
unlink("images/imagetodelete.jpg"); //or
unlink("http://www.mywebsite.com/images/imagetodelete.jpg");
Originally Posted by
Dasher
I think you have two ways to go; a relative path from the directory the php file is to the image file, or a full path to the image file such as
unlink("images/imagetodelete.jpg"); //or
unlink("http://www.mywebsite.com/images/imagetodelete.jpg");
Problem resolved, it was replace URL by $URL
Thanks anyway
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Bookmarks