Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/string/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 消息:未定义的属性:EE::$template_Php_Codeigniter_Expressionengine - Fatal编程技术网

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
,而实际不是。