function tpl_test() { $this->tpl->assign('my_var', 'swoole use smarty'); $this->tpl->display('tpl_test.html'); }