教程集 www.jiaochengji.com
教程集 >  脚本编程  >  php  >  正文 php include提示failed to open stream: Permission denied in错误

php include提示failed to open stream: Permission denied in错误

发布时间:2018-09-11   编辑:jiaochengji.com
教程集为您提供php include提示failed to open stream: Permission denied in错误等资源,欢迎您收藏本站,我们将为您提供最新的php include提示failed to open stream: Permission denied in错误资源
出现failed to open stream: Permission denied in是apache运行用户没用权限去访问指定的文件了,所以导致目录文件打不开了。

在打开浏览器时提示

Warning: include(/global.php) [function.include]: failed to open stream: Permission denied in \index.php on line 21

Warning: include() [function.include]: Failed opening '/global.php' for inclusion (include_path='.;C:\php5\pear') in index.php on line 21

Fatal error: Class 'fl_global' not found in \index.php on line 22

从这么多错误提示中我们可以看出一句failed to open stream: Permission denied in了,意思是说没有权限访问这个问题

linux解决办法

linux下

chmod -R 777 ./dirname 赋予目录可写权限

chmod 777 ./filename 赋予文件可写权限.

windows 2003解决办法

我是apache用户所以只需要给apache用户权限就可以了(如果是iis用户还需要在iis中设置权限哦)

例子:右击www或web目录,然后在弹出点击“安全与共享”或“属性”也可以打开之后选择安全之类的,然后增加用户并设置访问用户的权限必须选中下图所示了,注意了,我们增加访问用户必须与apache目录是一样的才可以哦。

\'php

您可能感兴趣的文章:
php include提示failed to open stream: Permission denied in错误
php提示 Warning: touch() [function.touch]: Utime failed: Permission denied in错误
php报错Permission denied的解决一法
PHP Warning: file_get_contents failed to open stream解决办法
php file_get_contents抓取https地址报错的解决办法
解决:failed to open stream: No such file or directory in
php include 与require 教程
详解PHP中include与require的用法区别
PHP中include()与require()的区别有哪些
php关于require和include的区别

[关闭]
~ ~