开发者

Ajax Request status

开发者 https://www.devze.com 2023-03-30 11:29 出处:网络
Am I missing something. I am making a simple AJAX request to a .php page with a simple echo \"hello\" statement in it, When I host this page on my localhost then I get the response back fine.

Am I missing something.

I am making a simple AJAX request to a .php page with a simple echo "hello" statement in it, When I host this page on my localhost then I get the response back fine. But when I upload this page on a remote ser开发者_Go百科ver I don't get the status 200 on the request, I have tested it by opening the page in the browser it works fine even there. I am stumped!


Funny but I have faced the same thing tonight. Be sure to omit the "www." from the Ajax call URL. This helped me. When I had this inside my URL I used to get status 302 which is a "redirect" status. Another thing u might want to test is put 127.0.0.1 in your address instead of localhost and see if it's working.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号