header("Access-Control-Allow-Origin: *");
        header("Access-Control-Allow-Methods: POST, GET, OPTIONS, PUT, DELETE");
        header('Access-Control-Allow-Headers:Origin,Content-Type,Accept,token,X-Requested-With,device');

 

这三行都需要,特别是要在header头里面传参数的时候,后2行很有用。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-06
  • 2021-06-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-09
  • 2021-10-03
  • 2022-12-23
  • 2021-11-01
  • 2022-12-23
相关资源
相似解决方案