Confusing private attributes this post was last edited by tp_2015_6 at 2015-06-1208:44:46. because smarty is used and the cache folder and template folder are redefined, this post is written in the portal file: $ tpl-& gt; template_dir.tpl; $ tpl-& gt; compile_dir.com; but confusing private attributes
This post was last edited by tp_2015_6 at 08:44:46
Because smarty is used and the cache folder and template folder are redefined, this is written in the entry file:
$ Tpl-> template_dir = "./tpl /";
$ Tpl-> compile_dir = "./com /";
However, in smarty. class. php, these two attributes are private, such
Private $ template_dir = array ('./templates /');
/**
* Compile directory
*
* @ Var string
*/
Private $ compile_dir = './templates_c /';
It is actually a private property. it is not allowed to assign a value again in the entry file. However, a strange thing happened, but it was allowed. isn't there any other authority here?
------ Solution ----------------------
Check whether the magic method _ set is used in the class.