function wang_json($data){
    //返回JSON数据格式到客户端,包含状态信息
    header('
        Content-Type:application/json;
        charset=utf-8
    ');
    header('Access-Control-Allow-Origin: *');//允许跨域
    echo json_encode($data);
}

 

相关文章:

  • 2021-12-16
  • 2021-04-03
  • 2021-08-31
  • 2021-11-17
  • 2021-12-22
  • 2021-12-31
  • 2022-12-23
  • 2021-10-14
猜你喜欢
  • 2021-06-29
  • 2022-12-23
  • 2021-05-29
  • 2021-05-28
  • 2022-01-26
  • 2022-12-23
相关资源
相似解决方案