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

  1. Have you been into the file manager in Cpanel to see if the file still exists?
  2. Did you use a relative URL from the unlink script to the file you wanted deleting?

problem resolved.

Thanks :slight_smile:

And the problem was?

replace URL from $URL, so difficult xD

Thanks anyway :slight_smile:

oh I do that when swapping between javascript and PHP, am always forgetting the $