protected function _initalize()
{
header("content-type:text/html;charset=utf-8");
header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Headers:Origin,X-Requested-With,Content-Type,Accept");
header("Access-Control-Allow-Methods:GET,POST,PUT");
ksort($_POST);
ksort($_GET);
}

以上是php7.0,如果遇到跨域问题,也可能是php版本问题

相关文章:

  • 2022-12-23
  • 2021-09-13
  • 2021-07-26
  • 2021-05-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-13
猜你喜欢
  • 2021-11-12
  • 2021-12-01
  • 2022-12-23
  • 2021-12-27
  • 2022-12-23
  • 2021-03-29
相关资源
相似解决方案