在 Windows 7 上更改 XAMPP 中的 php 写入权限

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9349469/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-26 06:38:18  来源:igfitidea点击:

changing php write permissions in XAMPP on Windows 7

phppermissionsxampp

提问by expiredninja

I'm trying to install a file-based blog engine in XAMPP, but all of these projects require write permissions to be changed. I'm assuming they are not talking the Windows setting that can be accessed through 'properties'. Any idea where/how to change this? seems like an easy question but i'm coming up short. Thank you.

我正在尝试在 XAMPP 中安装基于文件的博客引擎,但所有这些项目都需要更改写入权限。我假设他们不是在谈论可以通过“属性”访问的 Windows 设置。知道在哪里/如何改变这个吗?似乎是一个简单的问题,但我很短。谢谢你。

回答by dbrumann

Windows is generally less restrictive about read/write-permissions. If you did not install XAMPP into C:\ProgramFiles chances are good, that setting file-permissions does not apply to your installation. In the unlikely case, that your PHP-log shows warnings/errors regarding file permissions, then changing them like you described (with settings > permissions) is the way to go. You just have to find out, under which user name apache is running (via Administrative Tools, Services) and add read/write permissions for that user in the appropriate folder.

Windows 通常对读/写权限的限制较少。如果您没有将 XAMPP 安装到 C:\ProgramFiles 中,则该设置文件权限不适用于您的安装。在不太可能的情况下,您的 PHP 日志显示有关文件权限的警告/错误,然后按照您的描述(使用设置 > 权限)更改它们是可行的方法。您只需要找出 apache 在哪个用户名下运行(通过管理工具、服务)并在适当的文件夹中为该用户添加读/写权限。

In short, you can ignore the sections on setting file permissions on Windows.

简而言之,您可以忽略有关在 Windows 上设置文件权限的部分。

回答by James

Basically, the user that Apache runs as needs to able to write to the files.

基本上,Apache 运行的用户需要能够写入文件。

So firstly, check process list to determine which user that is. Then simply give that user write permission to those files/folders.

因此,首先,检查进程列表以确定是哪个用户。然后简单地授予该用户对这些文件/文件夹的写权限。

(I'm not a XAMPP or Win 7 user so can't give exact directions but I'm sure you'll work it out.)

(我不是 XAMPP 或 Win 7 用户,所以不能给出确切的指示,但我相信你会解决的。)