Home > Backend Development > PHP Tutorial > 安装dede UTF_8时报出了一个致命异常和警告,最后不能显示网站后台和首页了

安装dede UTF_8时报出了一个致命异常和警告,最后不能显示网站后台和首页了

WBOY
Release: 2016-06-13 12:28:44
Original
949 people have browsed it

安装dede UTF_8时报出了一个致命错误和警告,最后不能显示网站后台和首页了

安装dede UTF_8时报出了一个致命错误和警告,最后不能显示网站后台和首页了。报错如下:

登陆首页显示:Fatal error: Call to undefined function ParCv() in /include/dedesql.class.php on line 489

登陆后台显示:Deprecated: Function ereg_replace() is deprecated in /dede/config.php on line 2

Fatalerror: Call to undefined function ParCv() in \include\dedesql.class.php on line 489

(为保护客户的隐私,程序的完整路径没有写出,只写出错误路径。)

其实这个问题是因为function ParCv() 并没有封装在类 dedesql.class.php里。

下面给大家分享一下解决方法:

<span style="color: #008000;">//</span><span style="color: #008000;">特殊操作</span><span style="color: #008000;">/*</span><span style="color: #008000;">修改下面代码</span><span style="color: #008000;">*//*</span><span style="color: #008000;">if(isset($GLOBALS['arrs1'])){    $v1 = $v2 = '';    for($i=0;isset($arrs1[$i]);$i++)    {        $v1 .= ParCv($arrs1[$i]);    }    for($i=0;isset($arrs2[$i]);$i++)    {        $v2 .= ParCv($arrs2[$i]);    }    $GLOBALS[$v1] .= $v2;}</span><span style="color: #008000;">*/</span><span style="color: #0000ff;">if</span>(isset($GLOBALS['arrs1'<span style="color: #000000;">])){     $v1 </span>= $v2 =<span style="color: #000000;"> ”;     </span><span style="color: #0000ff;">for</span>($i=0;isset($arrs1[$i]);$i++<span style="color: #000000;">) {         $v1 .</span>=<span style="color: #000000;"> chr($arrs1[$i]);     }     </span><span style="color: #0000ff;">for</span>($i=0;isset($arrs2[$i]);$i++<span style="color: #000000;">) {        $v2 .</span>=<span style="color: #000000;"> chr($arrs2[$i]);     }     $GLOBALS[$v1] .</span>=<span style="color: #000000;"> $v2;}</span>
Copy after login

替换后清除下浏览器缓存,在进入前台和后台就显示正常运行了。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template