开发者

pass parameter from controller to view

I am passing

$router->map('Owner', 'Owner/:is_owner','null', a开发者_StackOverflow中文版rray('controller' => 'companies', 'action' => 'index','is_owner'=>'1'));

$router->map('Client', 'Client/:is_owner','null', array('controller' => 'companies', 'action' => 'index','is_owner'=>'0'));

in controller I'm getting it by,

 $flag=$_GET['is_owner'];

in view I want to access $flag...how to do that?


Using smarty you could do it as:

//In controller
$smarty->assign('flag',  $flag);

//In view
{$flag}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜