Php 消息:未定义的属性:EE::$template
我尝试在我的项目中使用Php 消息:未定义的属性:EE::$template,php,codeigniter,expressionengine,Php,Codeigniter,Expressionengine,我尝试在我的项目中使用templatelib。我知道 $this->EE->load->library('template'); $this->EE->template->parse_globals($template_query->row('template_data')); 但我犯了致命的错误 Severity: Notice Message: Undefined property: EE::$template Filename: membe
template
lib。我知道
$this->EE->load->library('template');
$this->EE->template->parse_globals($template_query->row('template_data'));
但我犯了致命的错误
Severity: Notice
Message: Undefined property: EE::$template
Filename: member_sync/mod.member_sync.php
Line Number: 158
Fatal error: Call to a member function parse_globals() on a non-object in /Library/Server/Web/Data/Domains/henigdiamondscouk/public-html/henig-cp/expressionengine/third_party/member_sync/mod.member_sync.php on line 158
我做错了什么
$this->EE->template->parse_globals($template_query->row('template_data'));
应该是:
$this->EE->TMPL->parse_globals($template_query->row('template_data'));
谢谢,我知道这一点,但我认为EE->template也应该可以工作,正如手册所说:)类的名称是TMPL,所以您需要使用TMPL访问它。您假设该类名为
template
,而实际不是。