请问织梦错误 Fatal error: Using $this when not in object context
错误提示:
Fatal error: Using $this when not in object context in D:wwwmeinvtupincludeaglibmynews.lib.php on line 40
原因:
- 在非对象上下文中使用了
$this
关键字。
解决方法:
- 修改
mynews.lib.php
文件:- 打开
include/aglib/mynews.lib.php
文件。 - 找到第40行,将以下代码:
if($envs['typeid'] > 0) $idsql = " where typeid='".GetTopid($this->TypeID)."' ";
- 修改为:
if($envs['typeid'] > 0) $idsql = " where typeid='".GetTopid($envs['typeid'])."' ";
- 打开
更新时间:2025-04-10 23:32:30
转载请注明原文链接:https://www.muzicopy.com/suibi/2464.html