在TP中,我有两个控制器
IndexAction.class.php //用户
AdminAction.class.php //管理通过超链接 <a href="__URL__/?a=logout">退出</a>
调用Admin控制器里的logout方法
从当前位置,也就是这里http://www.xxx.com/index.php/Admin/index跳转到
这里http://www.xxx.com/index.php/Index/index请问logout()方法里怎样实现这个跳转
谢谢
IndexAction.class.php //用户
AdminAction.class.php //管理通过超链接 <a href="__URL__/?a=logout">退出</a>
调用Admin控制器里的logout方法
从当前位置,也就是这里http://www.xxx.com/index.php/Admin/index跳转到
这里http://www.xxx.com/index.php/Index/index请问logout()方法里怎样实现这个跳转
谢谢
echo "<script language=\"javascript\">location.href='http://www.xxx.com/index.php/Index/index';</script>";
具体用法看手册