我似乎无法找到任何用于PHP的Windows文件系统的PHP函数
有什么想法?
chmod() 函数在Windows中可以正常工作(我刚刚测试过)。 $ b用户A是文件所有者,用户B不是那么容易的,那么将一组权限授予用户A和对用户B授予不同的权限是很容易的。你可以使用
希望有帮助。
Is there a way to properly set folder permissions via PHP on a Windows filesystem, such as granting user A full access, and user B read-only on folder \\fileserver\shares\users\A\
I can't seem to find any PHP functions for Windows filesystems for PHP
Any ideas?
解决方案Despite using the Unix file permission syntax, PHP's chmod() function does work in Windows (I just tested it).
If your user A was the file owner and user B wasn't then it would be easy to grant one set of permissions to user A and different permissions to user B. You can set the owner of a file using the chown() function (again, Unix-like syntax, but works with Windows, subject to your PHP program having sufficient permissions to itself to make the change).
Hope that helps.
更多推荐
在Windows中通过PHP设置文件夹权限
发布评论