weixin_33692284 2020-04-18 01:32 采纳率: 0%
浏览 83

Ajax请求错误的URL

I have page url/index.php which has a ajax request in it for url/submit.php. On most computers it works fine, but I have a client who's computer request url header is from url/index.php/submit.php instead of url/submit.php. Below is a short example of the JS used for the AJAX request. I'm not sure why it's making incorrect request substitution. It is occurs on both safari and chrome, but not on other computers in the same household.

AJAX request

req=new XMLHttpRequest();
req.open('POST','submit.php');                                                                req.setRequestHeader('Content-type','application/json;  charset=UTF-8');
req.onload=function(resp){
    if (resp.target.status==200){
          do something....
    }
}
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 找一个QT页面+目标识别(行人检测)的开源项目
    • ¥15 有没有整苹果智能分拣线上图像数据
    • ¥20 有没有人会这个东西的
    • ¥15 cfx考虑调整“enforce system memory limit”参数的设置
    • ¥30 航迹分离,航迹增强,误差分析
    • ¥15 Chrome Manifest扩展引用Ajax-hook库拦截请求失败
    • ¥15 用Ros中的Topic通讯方式控制小乌龟的速度,走矩形;编写订阅器代码
    • ¥15 LLM accuracy检测
    • ¥15 pycharm添加远程解释器报错
    • ¥15 如何让子窗口鼠标滚动独立,不要传递消息给主窗口