zoukankan      html  css  js  c++  java
  • XMLHttpRequest cannot load http://www.server.com/server.php. No 'Access-Control-Allow-Origin' header is present on the requested resource.Origin 'http://www.client.com' is therefore not allowed access

    jquery.easyui.min.js:5313 Uncaught TypeError: $.fn.validatebox.methods[_3bc] is not a function
    fy_scan_file_tab.do?gjMethod&sn=100:1 XMLHttpRequest cannot load http://IP地址:8088/archivesManage/yw_file.do?getXMLMessage&ftpPath=ftp:…IP地址:21/2017-09-19/%5B1971%5D%E8%81%8A-%E6%B0%91%E7%AC%AC102%E5%8F%B7. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8088' is therefore not allowed access.
    fy_scan_file_tab.do?gjMethod&sn=100:1 XMLHttpRequest cannot load http://IP地址:8088/archivesManage/yw_file.do?getPicListBeforeGJ&filePat…IP地址:21/2017-09-19/%5B1971%5D%E8%81%8A-%E6%B0%91%E7%AC%AC102%E5%8F%B7. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8088' is therefore not allowed access.      

    No 'Access-Control-Allow-Origin' header is present on the requested resource. 在项目开发中遇到该问题,从网上看到资料说是ajax异步访问造成的。这是因为搜索的方向错误了重点关注'http://localhost:8088' is therefore not allowed access. 这一部分。发现请求的方式不一致,请求路径是localhost,而实际路径中应该是ip地址。修改请求路径后发现问题解决。因为是用idea开发的在configurations 中修改访问路径后解决。 

       另外需要补充一点的是,关注下报错的访问路径跟实际访问路径,如果不一致但是项目在自己电脑上能正常使用,考虑下路径是截取了数据库中的部分字段,因为写死了造成换机器后不能使用了

    本人经验尚浅,从之前同行的分享中受益颇多,希望我的分享也能帮助到其他同行。我会继续努力的。让我们一起加油。

     

  • 相关阅读:
    Compiere中的树
    Compiere 模型构建
    LSMW魔鬼教程
    Compiere 因翻译工作没有完成,所以现在系统中的所有帮助去掉
    插入、更新扩展字段
    SAPscript Forms 教程
    SAP ABAP 效率测试
    批量更新数据表
    月份的描述表T247
    SAP 程序下载工具
  • 原文地址:https://www.cnblogs.com/a6948076/p/8004949.html
Copyright © 2011-2022 走看看