网站后台生成栏目页时出现如下错误:
Fatal error: Using $this when not in object context in D:\www\meinvtup\include\taglib\mynews.lib.php on line 40
或者是在织梦模板中的首页调用站内新闻后提示如下错误:
Fatal error: Using $this when not in object context in D:\www\meinvtup\include\taglib\mynews.lib.php on line 40
解决方法
打开/include/taglib/mynews.lib.php文件
找到
if($envs['typeid'] > 0) $idsql = " where typeid='".GetTopid($this->TypeID)."' ";
改成
if($envs['typeid'] > 0) $idsql = " where typeid='".GetTopid($envs->TypeID)."' ";