php/iis:无法打开流:权限被拒绝 [英] php/iis: failed to open stream: Permission denied

查看:166
本文介绍了php/iis:无法打开流:权限被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试这样做:

$fh = fopen("req2" , 'w')

我得到:

警告:fopen(D:\ inetpub \ wwwroot \ req2)[function.fopen]:无法执行 打开流:在D:\ inetpub \ wwwroot \ test.php中拒绝权限 44无法打开文件

Warning: fopen(D:\inetpub\wwwroot\req2) [function.fopen]: failed to open stream: Permission denied in D:\inetpub\wwwroot\test.php on line 44 can't open file

我在wwwroot目录中为IIS授予了完全控制"权限.我也尝试了绝对路径:$_SERVER['DOCUMENT_ROOT']."\\req2"

I gave "Full Control" permissions to IIS in the wwwroot directory. I had also tried the absolute path: $_SERVER['DOCUMENT_ROOT']."\\req2"

但我仍然遇到相同的错误.我在Windows 7上运行IIS 7.

but i still get the same error. I am running IIS 7 on Windows 7.

推荐答案

在Windows中,您需要授予用户IUSR权限.

In Windows, you need to give user, IUSR the permission.

这篇关于php/iis:无法打开流:权限被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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