VPS侦探论坛

 找回密码
 注册
查看: 3340|回复: 3

程序出现异常

[复制链接]
发表于 2016-9-8 11:36:57 | 显示全部楼层 |阅读模式

Warning: file_exists(): open_basedir restriction in effect. File(/home/wwwroot/www.1232.caches/install.check) is not within the allowed path(s): (/home/wwwroot/www.1232.com:/tmp/:/var/tmp/:/proc/) in /home/wwwroot/www.1232.com/install/index.php on line 229

缓存文件无法执行,open_basedir 如何配置?

[ 本帖最后由 anqingww 于 2016-9-8 12:32 编辑 ]
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2016-9-8 15:08:19 | 显示全部楼层
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2016-9-8 20:03:41 | 显示全部楼层

程序出现异常


报错:file_put_contents(/home/wwwroot/1232.com/web/): failed to open stream: Is a directory
File    coreframe->/app/tags/libs/class/html_tags.class.php


程序出错:
private function createhtml($file)
    {
        $data = ob_get_contents();
        ob_clean();
        $dir = dirname($file);
        if(!is_dir($dir))
        {
            mkdir($dir, 0777,1);
        }
        $strlen = file_put_contents($file, $data);
        @chmod($file,0777);
        if(!is_writable($file))
        {
            $file = str_replace(WWW_ROOT,'',$file);
            MSG(L('file').':'.$file.'<br>'.L('not_writable'));
        }
        return $strlen;
    }


前面的问题已解决,,现在又出现这个问题,请军哥指点一下是哪里配置问题!
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2016-9-9 09:26:51 | 显示全部楼层



能先看看错误信息不,这明显是你php写的有问题,file_put_contents 写入的得是文件,目录能写入吗
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-28 23:30 , Processed in 0.025568 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表