我无法用php找出远程服务器的新问题
这是我程序中发生问题的部分
function handleLogin(email, password, callback){
var jsonToReturn = "";
$.ajax(appRoot+'access/login', {
method: "POST",
data: {email:email, password:password}
}).done(function(returnedData){
if(returnedData.status === 1){
jsonToReturn = {status:1, msg:"Authenticated..."};
}
else{
//display error messages
jsonToReturn = {status:0, msg:"Invalid email/password combination"};
}
typeof(callback) === "function" ? callback(jsonToReturn) : "";
}).fail(function(){
//set error message based on the internet connectivity of the user
var msg = "Log in failed. Please check your internet connection and try again later.";
//display error messages
jsonToReturn = {status:0, msg:msg};
typeof(callback) === "function" ? callback(jsonToReturn) : "";
});
}
在本地服务器上工作正常,但是在远程服务器上,它调用失败功能并显示消息“登录失败。请检查您的Internet连接,然后重试。”
预先感谢