开发者

php and chmod does not work

开发者 https://www.devze.com 2023-02-27 07:00 出处:网络
Hi I want to write a file by using php, but first I should set permissions. When I开发者_JAVA百科 try chmod($file,0777); it doesn\'t work and returns false.

Hi I want to write a file by using php, but first I should set permissions. When I开发者_JAVA百科 try chmod($file,0777); it doesn't work and returns false.

What should I do for enable chmod function?


Hey you can do one thing.....go to console and see the file writes and its user using ll command... if user is not a apache user then its will gives you error even if you are syntactically right..so change the group and owner of file to apache using chgrp and chrown command and then run the code...you can see the output........

0

精彩评论

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