首页 >  帮助中心 > dedecms织梦PHP7前台空白 图片浏览器不显示 mysql错误解决方法

dedecms织梦PHP7前台空白 图片浏览器不显示 mysql错误解决方法

来源:原创 点击量(126) 发布时间:2019-08-02

1、修改  include/common.inc.php 让错误显示出来

16行代码


error_reporting(E_ALL || ~E_NOTICE);

改成

error_reporting(E_ALL);

    //error_reporting(E_ALL || ~E_NOTICE);

image.png

2、‘continue’ not in the ‘loop’ or ‘switch’ context错误


Fatal error: ‘continue’ not in the ‘loop’ or ‘switch’ context in ….include/common.func.php on line 49


上面表示include/common.func.php 这个文件的49行有错误,


把 continue; 删除


改为 return;




3、函数mysql_query()未定义


mysql_*的系列函数在php7中不能再使用,


会出现下面的错误


Fatal error: Uncaught Error: Call to undefined function mysql_query() in ….include/dedesql.class.php:152


php7中需要使用mysqli或者pdo的方式,


跟数据库通信,


更安全更高效。


解决的方法


打开文件 data/config.cache.inc.php


$cfg_mysql_type = ‘mysql’;


改为


$cfg_mysql_type = ‘mysqli’;

4、Warning:fwrite() expects parameter 1 to be resource, null given in <b>/include/dedetag.class.php

直接修改php.ini 


display_errors = On

改成 

display_errors = off

image.png

5、今天又发现 图片浏览器不显示

image.png


  • 服务热线   4006-598-598