name="first dog"; $smarty->assign("dog",$dog1); $smarty->display('test.tpl'); ?>
test.tpl文件:
属性调用:{$dog->name} 方法调用:{$dog->sayHello()}
输出显示:
first doghello
上一篇:如何给WordPress的编辑后台添加提示框
下一篇:WordPress开发中过滤属性以及Sql语句的函数使用方法