您好,欢迎访问一九零五行业门户网

Smarty赋值对象方法,配置简化封装类

赋值对象方法
html标签写法{$对象名->属性名/方法名()} 一般还是比较少用的
temp3{$man->name} {$man->say()}
name; }}$man= new man();require('../../smarty3/libs/smarty.class.php');require('./mysmarty.class.php');$smarty=new mysmarty();// 赋值对象$smarty->assign('man',$man);$smarty->display('temp4.html');?>
配置简化封装类 class.php
template_dir='./temp'; $this->compile_dir='./comp'; 因为是父类私有属性,所以不能改写 smarty内部有开放的接口,settemplatedir可修改*/ public function __construct(){ parent::__construct(); $this->settemplatedir('./temp'); $this->setcompiledir('./comp'); }}
以上就介绍了smarty赋值对象方法,配置简化封装类,包括了require方面的内容,希望对php教程有兴趣的朋友有所帮助。
其它类似信息

推荐信息