Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我的用户“apache”创建一个目录时,我无法通过 php 上传向它添加新文件,我必须更改文件夹的权限才能使其工作。
我如何确保当用户上传文件并且文件夹由 php 自动创建时,该文件将在创建后添加到该文件夹中,而不会给我一个不可写的文件夹错误?
尝试以下操作:
mkdir($newdirectory); chmod($newdirectory, 0777);