xiaobai 发表于 2020-7-17 17:25:52

DISCUZ -- 解决set_magic_quotes_runtime()出错的方法

在php7中,很多致命错误以及可恢复的致命错误,都被转换为异常来处理了。因为在php7版本中,已经使用抛出异常的错误处理机制了。(如果代码中没有捕获Error的异常,那么会引发致命错误)

问题
DISCUZ -- 解决set_magic_quotes_runtime()出错的方法
Fatal error: Uncaught Error: Call to undefined function set_magic_quotes_runtime() in /usr/local/httpd/htdocs/zhcool/bbs/install/index.php:12 Stack trace: #0 {main} thrown in /usr/local/httpd/htdocs/zhcool/bbs/install/index.php on line 12

解决办法:

打开根目录找到/install/index.php
搜索找到 set_magic_quotes_runtime(
改成 //set_magic_quotes_runtime(
或者添加这一行 ini_set("magic_quotes_runtime",0);

再或者直接将该段代码注释掉即可。
ini_set("magic_quotes_runtime",0);
页: [1]
查看完整版本: DISCUZ -- 解决set_magic_quotes_runtime()出错的方法