如何在Windows计算机上的Apache中设置读写权限 [英] How to set read/write permissions in Apache on a Windows computer

查看:484
本文介绍了如何在Windows计算机上的Apache中设置读写权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Windows XP计算机上以localhost配置在Apache2.2,PHP5.2.2上构建网页.我正在开发app/pages/submitProcessor.php来验证用户上传的照片.它验证文件的存在,大小,mime类型,删除不需要的字符,分配新的文件名,并使用move_uploaded_file()将文件存储在应用程序/上传文件中.我读了 PHP-有关上传和下载问题;上传的图片文件,该照片存储文件只能从app/pages/submitProcessor.php写入,如果仅从app/pages中的代码读取,那就很好了.

I am building a web page with Apache2.2, PHP5.2.2 on a Windows XP computer in a localhost configuration. I'm developing app/pages/submitProcessor.php to validate photo uploads from users. It validates file existance, size, mime type, drops unwanted characters, assigns a new file name, and uses move_uploaded_file() to store the file in app/uploads. I read in PHP - Question about uploading & uploaded image file that this photo storage file should be write only from app/pages/submitProcessor.php and it would be nice if it were read only from code within app/pages.

我已经阅读了很多信息,并且对此很陌生,我仍然不了解如何以类似于我的配置的方式在Windows XP中设置读/写权限.我对777、775、755,php.ini与httpd.config和linux与Windows完全感到困惑.我对命令行的内容也不满意,如果可能的话,我希望编辑适当的文件.如何配置Apache,以便app/uploads中的任何文件都不可执行,仅从app/pages/submitProcessor.php写入,并从app/pages/display或app/pages中的其他文件读取. . .或者至少我想接近那个. app/upload目录中的不可执行文件对我来说很重要.

I've read a lot of info, and being pretty new to this, I still don't understand how to set read/write permissions in Windows XP in something resembling my configuration. I'm completely confused by 777, 775, 755, php.ini vs httpd.config and linux vs Windows. I'm also not comfortable with command line stuff, and would prefer to edit the appropriate file, if that is possible. How do I configure Apache so any file in app/uploads will not be executable, will write only from app/pages/submitProcessor.php, and read from app/pages/display or others in app/pages . . . or at least I'd like to get close to that. Not executable in the app/upload directory is pretty important to me.

推荐答案

在Windows中,通过右键单击目录,然后通读各个选项卡提供的选择来设置对目录/文件夹的访问和特定用途,从而设置对目录/文件夹的访问权限目录.它不像CHMOD那样细,但是就我目前的目的而言已经足够了.

In Windows, access to directories/folders is set by right clicking the directory, and reading through the selections provided by the various tabs to set access and specific uses of the directory. Its not as fine-grained as CHMOD, but it was good enough for my purposes at the moment.

这篇关于如何在Windows计算机上的Apache中设置读写权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆