Home >Backend Development >PHP Tutorial >frameset框架登录失效后,如何重定向到登录页

frameset框架登录失效后,如何重定向到登录页

WBOY
WBOYOriginal
2016-06-23 13:44:58732browse

如题我用的yii框架,直接下面这样重定向,登录页面会显示在框架里边。
如何在登录失效后再访问页面,让整个页面重定向到登录页
$this->redirect(array('site/login'));


回复讨论(解决方案)

需要用 js

echo "<script>top.location = '/site/login'</script>";

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn