大家好,我正在创建一个 TOS 弹出窗口,如果用户拒绝 .ajax 函数,则会调用一个 .php 文件,该文件会破坏他们的会话并将它们发送回登录页面。
这是一个受 SSL 锁保护的站点,所以我收到一条错误消息:
where the ajax function is that gets the other page with the destroy session and redirect
显示不安全内容的页面来自the login page which is suppose to be sent to, the user.
功能:
function decline(){
$("#dialog-container").dialog( 'close' );
/*****run ajax to kill session of current user and return to login page ******/
$.ajax({ url: 'termsofservice/declinedkill.php',
data: {},
type: 'get',
success: function(output) {
}
});
}
这是被拒绝的kill.php:
session_start();
session_destroy();
header("location:/PCG/mainlogin.php");
我确保我没有使用任何包含其他文件等的链接......所以不确定出了什么问题。
谢谢,大卫:)
编辑:
这是我正在使用的更新链接:
$.ajax({ url: '//mysite.com/PCG/termsofservice/declinedkill.php',
data: {},
type: 'post',
success: function(output) {
}
});
拒绝kill.php
header("location:https://mysite.com/PCG/mainlogin.php");
所以现在我没有收到该消息,但我没有被重定向?