fan-Y
  • header("Access-Control-Allow-Origin: http://a.com"); // 允许a.com发起的跨域请求  
  • //如果需要设置允许所有域名发起的跨域请求,可以使用通配符 *  
  • header("Access-Control-Allow-Origin: *"); // 允许任意域名发起的跨域请求  
  • header(\'Access-Control-Allow-Headers: X-Requested-With,X_Requested_With\'); 

 

 

以上并没有测试,敬请原谅!

分类:

技术点:

相关文章:

  • 2021-09-02
  • 2021-11-08
  • 2021-11-09
  • 2021-07-12
  • 2021-07-17
猜你喜欢
  • 2021-11-02
  • 2022-03-06
  • 2022-02-10
  • 2021-12-06
  • 2021-06-16
  • 2021-10-07
相关资源
相似解决方案