----------------------------------------------------------------------------------------------------

header('content-type:text/html;charset=utf-8');
$a = '中文';
echo json_encode($a);//5.3版本以前,无参数情况输出 "\u4e2d\u6587"
echo json_encode($a, JSON_UNESCAPED_UNICODE); // "中文"

 

[PHP] json_encode增加options参数后支持中文

 

Refer:什么是json_encode

Link: http://www.cnblogs.com/farwish/p/3847845.html

相关文章:

  • 2022-01-15
  • 2021-10-21
  • 2021-05-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-17
猜你喜欢
  • 2021-06-25
  • 2022-12-23
  • 2022-12-23
  • 2021-10-19
  • 2022-02-06
  • 2022-12-23
  • 2021-11-17
相关资源
相似解决方案