SSR服务器搭建,VPS搭建SSR,SSR客户端配置,vultr搭建SSR,dedecms,织梦,科学上网,织梦伪静态规则,织梦全站伪静态,织梦手机版伪静态

织梦DEDECMS首页报错:Warning: Illegal string offset ‘url’ in

工作手记 baishitou 124℃

今天在访问网站首页时,发现顶部有错误代码显示 :

Warning: Illegal string offset 'url' in /www/include/taglib/flink.lib.php on line 139
Warning: Illegal string offset 'webname' in /www/include/include\taglib\flink.lib.php on line 140
Warning: Illegal string offset 'logo' in /www/include/include\taglib\flink.lib.php on line 141

解决方法:打开“\include\taglib\flink.lib.php”文件把里面的“$row[‘url’]”、“$row[‘webname’]”、“$row[‘logo’]”按下面代码进行替换即可。

原代码:

$rbtext = preg_replace("/\[field:url([\/\s]{0,})\]/isU", $row['url'], $innertext);
$rbtext = preg_replace("/\[field:webname([\/\s]{0,})\]/isU", $row['webname'], $rbtext);
$rbtext = preg_replace("/\[field:logo([\/\s]{0,})\]/isU", $row['logo'], $rbtext);
$rbtext = preg_replace("/\[field:link([\/\s]{0,})\]/isU", $link, $rbtext);
$revalue .= $rbtext;

修改后的代码:

$rbtext = preg_replace("/\[field:url([\/\s]{0,})\]/isU", $dbrow->url, $innertext);
$rbtext = preg_replace("/\[field:webname([\/\s]{0,})\]/isU", $dbrow->webname, $rbtext);
$rbtext = preg_replace("/\[field:logo([\/\s]{0,})\]/isU", $dbrow->logo, $rbtext);
$rbtext = preg_replace("/\[field:link([\/\s]{0,})\]/isU", $link, $rbtext);
$revalue .= $rbtext;

替换后,问题解决。

红色部分即修改后的代码:

转载请注明:白石头博客 » 织梦DEDECMS首页报错:Warning: Illegal string offset ‘url’ in

喜欢 (0)or分享 (0)