简体   繁体   English

用PHP上传文件并授予该文件的权限

[英]File upload in PHP and give permission for that files

I need develop a web app like www.Sharefile.com. 我需要开发一个Web应用程序,如www.Sharefile.com。 I want users to upload and then give permissions to that file for access by particular users only. 我希望用户上载然后授予该文件权限,以供特定用户访问。

I don't know how to give permissions for server files (upload file like pdf,word) using PHP. 我不知道如何使用PHP授予服务器文件(上传文件,如pdf,word)的权限。

You ask a general question, so you get a general answer: I assume you already have some login set up for these users to upload their files. 您提出一个一般性问题,因此得到一个一般性答案:我假设您已经为这些用户设置了一些登录名,以上传他们的文件。 Using this same login system, you can control permissions on specific files. 使用相同的登录系统,您可以控制特定文件的权限。 This is not necessarily done in php itself. 这不一定在php本身中完成。 For example, user and file permissions may be stored in a DB. 例如,用户和文件权限可以存储在DB中。 The files themselves will probably have usual permissions. 文件本身可能具有通常的权限。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM