2012-05-30 74 views
-3

不知道如何抹掉这个,但我发现这个代码很有效,因为它应该。但是我不想在iframe中重定向!基本上我想要的是登录的用户被重定向到他自己的目录,只有他有权访问它,有意义吗?删除iframe

if($session->logged_in){ 

<echo" 
iframe id=\"login-form\" frameborder=\"0\" scrolling=\"no\" width=\"100%\"  src=\"$serverroot.$session->directory/abc.php\" height=\"400\" align=\"left\"></iframe><br /> 
"; 

应该是很简单的(不适合我,虽然... :)

人照顾到芯片?

回答

2

所以后来只是做一个头重定向:

header("Location: {$serverroot}{$session->directory}/abc.php"); 
exit; // just in case you have more code beneath you don't want to execute. 
+0

感谢,但它跳过用户目录,去我的ServerRoot /abc.php – user1424728

+0

@ user1424728没关系,但你的IFRAME具有相同的'src'为在我的答案中;所以我需要更多的背景信息 –

+0

好吧,感谢您的意见,我终于把它放在一起,我把用户名,而不是目录在重定向!感谢您帮助解决这个看似微不足道的问题! :) – user1424728