我正在传递
$router->map('Owner', 'Owner/:is_owner','null', array('controller' => 'companies', 'action' => 'index','is_owner'=>'1'));
$ router-> map('Client','Client /:is_owner','null',数组('controller'=>'公司','action'=>'index','is_owner' => '0'));
在控制器中我得到它,
$flag=$_GET['is_owner'];
在视图中我想访问$ flag ...怎么做?
答案 0 :(得分:2)
使用smarty你可以这样做:
//In controller $smarty->assign('flag', $flag); //In view {$flag}