• 首先你要看 ajaxReturn的原型:
protected function ajaxReturn ($data, $type='', $json_option=0){
........

switch(strtoupper($type)){
case: 'json':
    header('Content-Type: application/json;  charset=utf-8');
    exit(json_encode($data, $json_option);
break;

}

}

所以, ajaxReturn 使用的是 exit (‘。。。’, $json_option)本身就会、就已经 输出了 json编码后的字符串 内容了。 后面就不需要再用 echo了

  • 其次, 使用 ajaxReturn后, 脚本都已经 exit了, 那么你再用echo什么的 , 都 已经 不起作用了!

相关文章:

  • 2022-02-18
  • 2021-08-08
  • 2021-09-01
  • 2021-06-13
  • 2021-08-16
  • 2021-09-25
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-04-29
  • 2021-05-21
  • 2021-05-28
  • 2022-12-23
  • 2021-11-08
相关资源
相似解决方案