TemplateLite显示对象模型

#1 btboy

实在是google不到了,所以到这里来寻求帮助。
使用的是 TemplateLite 模板。

1.怎么获取session里面的内容, 目前我是 $this->myvar 过去的。

2. 怎么显示对象数据 $myvar.name  $myvar['name'] 均报错。

2011-02-18 17:07:21

#2 jake

$templatelite[SESSION][id]或者$templatelite.SESSION.id

对象用
$myvar->name

和smarty差不多的

2011-02-18 17:13:10

#3 btboy

$templatelite.SESSION.id 有效。

$myvar->name 报错

我的对象可以dump出来


__PHP_Incomplete_Class Object
(
    [__PHP_Incomplete_Class_Name] => s_user
    [sn] => 1298018725739058
    [account] => btboy
    [name] => test
    [header] =>
    [mail] => [email]s@ds.com[/email]
)


错误:

Object of class __PHP_Incomplete_Class could not be converted to string

说不能转化成string

2011-02-18 17:20:55

#4 jake

文档上好像没提对象。。。:L

http://templatelite.sourceforge.net/docs/index.html

2011-02-18 17:42:56