开发者

chmod - file does not exist

开发者 https://www.devze.com 2023-03-04 15:09 出处:网络
I got a file that\'s located in /uploads/original/img_329020110508094322.jpg When I do <img s开发者_如何学Gorc=\"/uploads/original/img_329020110508094322.jpg\" />

I got a file that's located in /uploads/original/img_329020110508094322.jpg

When I do <img s开发者_如何学Gorc="/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?


chmod() operates on your filesystem. You must point to the image file within your filesystem, not within your web server.


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 :)

0

精彩评论

暂无评论...
验证码 换一张
取 消