当我使用此 (php) 禁止他进入我的聊天框时,我试图重定向我页面的用户:
header("location: index.php");
exit;
问题是 index.php 页面在已连接的用户部分中打开,在本例中是在 div
中打开。如何重定向用户的主页?
感谢您的宝贵时间。
最佳答案
在 javascript 代码中试试这个:
window.top.location.href = "http://www.site.com";
关于php - 如何将 URL 重定向到父 iframe,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14985048/