I have a directory structure like this:
img(rwxrw-rw-) ---> img1.jpg,
but when I try to use
Unlikely /img directory exists since the leading / means it's at the root level of the hard drive. Try
./ means THIS directory, eg, the directory the currently running PHP script is in.