Reputation: 2200
I got a file that's located in /uploads/original/img_329020110508094322.jpg
When I do <img src="/uploads/original/img_329020110508094322.jpg" />
It will display properly
I want to change the user rights to 0606, so I do chmod($this->fileName, 0606);
($this->fileName stores the path above) but all I get is file or directory does not exist.
Why?
Upvotes: 1
Views: 1977
Reputation: 2777
cause your path is relative to your web root. add the location of your web root before the file name, and chmod should work.
what i'm trying to say is that chmod uses exact paths on your file system :)
Upvotes: 0
Reputation: 799420
chmod()
operates on your filesystem. You must point to the image file within your filesystem, not within your web server.
Upvotes: 4