织梦 Warning: Illegal string offset ‘account’ in

  • 织梦 Warning: Illegal string offset ‘account’ in已关闭评论
  • A+
所属分类:高手分享

织梦在调试的时候出现如下错误:

  1. Warning: Illegal string offset 'url' in G:\wwwroot\include\taglib\flink.lib.php on line 139
  2. Warning: Illegal string offset 'webname' in G:\wwwroot\include\taglib\flink.lib.php on line 140
  3. Warning: Illegal string offset 'logo' in G:\wwwroot\include\taglib\flink.lib.php on line 141
  4. Warning: Illegal string offset 'url' in G:\wwwroot\include\taglib\flink.lib.php on line 139
  5. Warning: Illegal string offset 'webname' in G:\wwwroot\include\taglib\flink.lib.php on line 140
  6. Warning: Illegal string offset 'logo' in G:\wwwroot\include\taglib\flink.lib.php on line 141
  7. Warning: Illegal string offset 'url' in G:\wwwroot\include\taglib\flink.lib.php on line 139
  8. Warning: Illegal string offset 'webname' in G:\wwwroot\include\taglib\flink.lib.php on line 140
  9. Warning: Illegal string offset 'logo' in G:\wwwroot\include\taglib\flink.lib.php on line 141
  10. Warning: Illegal string offset 'url' in G:\wwwroot\include\taglib\flink.lib.php on line 139
  11. Warning: Illegal string offset 'webname' in G:\wwwroot\include\taglib\flink.lib.php on line 140
  12. Warning: Illegal string offset 'logo' in G:\wwwroot\include\taglib\flink.lib.php on line 141
  13. Warning: Illegal string offset 'url' in G:\wwwroot\include\taglib\flink.lib.php on line 139
  14. Warning: Illegal string offset 'webname' in G:\wwwroot\include\taglib\flink.lib.php on line 140
  15. Warning: Illegal string offset 'logo' in G:\wwwroot\include\taglib\flink.lib.php on line 141
  16. Warning: Illegal string offset 'url' in G:\wwwroot\include\taglib\flink.lib.php on line 139
  17. Warning: Illegal string offset 'webname' in G:\wwwroot\include\taglib\flink.lib.php on line 140
  18. Warning: Illegal string offset 'logo' in G:\wwwroot\include\taglib\flink.lib.php on line 141
  19. Warning: Illegal string offset 'url' in G:\wwwroot\include\taglib\flink.lib.php on line 139
  20. Warning: Illegal string offset 'webname' in G:\wwwroot\include\taglib\flink.lib.php on line 140
  21. Warning: Illegal string offset 'logo' in G:\wwwroot\include\taglib\flink.lib.php on line 141
  22. Warning: Illegal string offset 'url' in G:\wwwroot\include\taglib\flink.lib.php on line 139
  23. Warning: Illegal string offset 'webname' in G:\wwwroot\include\taglib\flink.lib.php on line 140
  24. Warning: Illegal string offset 'logo' in G:\wwwroot\include\taglib\flink.lib.php on line 141
  25. Warning: Illegal string offset 'url' in G:\wwwroot\include\taglib\flink.lib.php on line 139
  26. Warning: Illegal string offset 'webname' in G:\wwwroot\include\taglib\flink.lib.php on line 140
  27. Warning: Illegal string offset 'logo' in G:\wwwroot\include\taglib\flink.lib.php on line 141
  28. Warning: Illegal string offset 'url' in G:\wwwroot\include\taglib\flink.lib.php on line 139
  29. Warning: Illegal string offset 'webname' in G:\wwwroot\include\taglib\flink.lib.php on line 140
  30. Warning: Illegal string offset 'logo' in G:\wwwroot\include\taglib\flink.lib.php on line 141
  31. Warning: Illegal string offset 'url' in G:\wwwroot\include\taglib\flink.lib.php on line 139
  32. Warning: Illegal string offset 'webname' in G:\wwwroot\include\taglib\flink.lib.php on line 140
  33. Warning: Illegal string offset 'logo' in G:\wwwroot\include\taglib\flink.lib.php on line 141
  34. Warning: Illegal string offset 'url' in G:\wwwroot\include\taglib\flink.lib.php on line 139
  35. Warning: Illegal string offset 'webname' in G:\wwwroot\include\taglib\flink.lib.php on line 140
  36. Warning: Illegal string offset 'logo' in G:\wwwroot\include\taglib\flink.lib.php on line 141

解决织梦友情连接报错的方法:

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

 

源代码如下:
  1.  
  2. $rbtext = preg_replace("/\[field:url([\/\s]{0,})\]/isU", $row['url'], $innertext);
  3. $rbtext = preg_replace("/\[field:webname([\/\s]{0,})\]/isU", $row['webname'], $rbtext);
  4. $rbtext = preg_replace("/\[field:logo([\/\s]{0,})\]/isU", $row['logo'], $rbtext);
  5. $rbtext = preg_replace("/\[field:link([\/\s]{0,})\]/isU", $link, $rbtext);
  6. $revalue .= $rbtext;
改完后正确的代码如下:
  1. $rbtext = preg_replace("/\[field:url([\/\s]{0,})\]/isU", $dbrow->url, $innertext);
  2. $rbtext = preg_replace("/\[field:webname([\/\s]{0,})\]/isU", $dbrow->webname, $rbtext);
  3. $rbtext = preg_replace("/\[field:logo([\/\s]{0,})\]/isU", $dbrow->logo, $rbtext);
  4. $rbtext = preg_replace("/\[field:link([\/\s]{0,})\]/isU", $link, $rbtext);
  5. $revalue .= $rbtext;
  • 业务扫我的微信
  • 这是我的微信扫一扫
  • weinxin
  • 关注我的微信
  • 免费领取优化工具跟外链大全
  • weinxin