开发者

Grant Permission to Folder using PHP

开发者 https://www.devze.com 2022-12-30 19:43 出处:网络
I need to grant write permission to temporary folder of all local machine (if it does not have)which access my php site. I开发者_开发技巧s it possible using PHP?No, you can\'t because PHP works server

I need to grant write permission to temporary folder of all local machine (if it does not have)which access my php site. I开发者_开发技巧s it possible using PHP?


No, you can't because PHP works server-side only! PHP is used to create HTML output and cannot access files on client-side machines.

chmod('path/to/my/folder',777); will only change file permissions on the server machine - never on a client!


You can use the php function chmod. You want to be careful of course but you could say

chmod('/path/to/my/folder',777);

Or whatever write permissions you want.

http://php.net/manual/en/function.chmod.php

0

精彩评论

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