A fatal error and warning was reported when installing dede UTF_8, and finally the website backend and homepage could no longer be displayed. The error is reported as follows:
The login homepage displays: Fatal error: Call to undefined function ParCv() in /include/dedesql.class.php on line 489
The login background displays: Deprecated: Function ereg_replace() is deprecated in /dede/config .php on line 2
Fatalerror: Call to undefined function ParCv() in includededesql.class.php on line 489
(To protect the privacy of customers, the full path of the program is not written, only the error path is written.)
In fact, this problem is because function ParCv() is not encapsulated in class dedesql.class.php.
Let me share with you the solution:
<span>//</span><span>特殊操作</span><span>/*</span><span>修改下面代码</span><span>*//*</span><span>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>*/</span><span>if</span>(isset($GLOBALS['arrs1'<span>])){ $v1 </span>= $v2 =<span> ”; </span><span>for</span>($i=0;isset($arrs1[$i]);$i++<span>) { $v1 .</span>=<span> chr($arrs1[$i]); } </span><span>for</span>($i=0;isset($arrs2[$i]);$i++<span>) { $v2 .</span>=<span> chr($arrs2[$i]); } $GLOBALS[$v1] .</span>=<span> $v2; }</span>
After replacing it, clear the browser cache, and it will show normal operation when entering the foreground and background.
The above introduces a fatal error and warning when installing dede UTF_8. In the end, the website backend and homepage cannot be displayed, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.