我是靠谱客的博主 甜蜜花生,最近开发中收集的这篇文章主要介绍php设置文件权限问题,使用PHP在Windows中设置文件权限,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

The problem only happens when you use PHP to upload a file. When you upload a file, PHP sends the file to a temporary directory on the

hard drive (for me it is C:WindowsTemp) and then copies it over to

it’s intended directory. Once the file has landed in the temporary

directory, it is assigned the permissions of that directory. The

problem is when Windows copies that file, it keeps the temporary

directory’s permissions and doesn’t inherit your web directory’s

permissions.

The easiest way to fix this problem is to add to the temporary directory your intended web directory’s permissions. There’s no need

to erase the permissions already in the temporary directory, just add

the web directory’s permissions to them. In other words, follow these

steps

To change the permissions of your temporary upload directory, find

the “upload_tmp_dir” in your php.ini file.

Set it to the directory

of your choosing (outside your web folders of course) or leave it at

default (for me it is C:WindowsTemp).

Browse to this folder and add the permissions of your web folders to it.

最后

以上就是甜蜜花生为你收集整理的php设置文件权限问题,使用PHP在Windows中设置文件权限的全部内容,希望文章能够帮你解决php设置文件权限问题,使用PHP在Windows中设置文件权限所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(65)

评论列表共有 0 条评论

立即
投稿
返回
顶部