[PHP]json
程序员文章站
2024-01-02 19:57:22
...
---------------------------------------------------------------------------------------------------- header ('content-type:text/html;charset=utf-8' ); $a = '中文' ; echo json_encode( $a ); // 5.3版本以前,无参数情况输出 "\u4e2d\u6587" echo
----------------------------------------------------------------------------------------------------
header('content-type:text/html;charset=utf-8'); $a = '中文'; echo json_encode($a);//5.3版本以前,无参数情况输出 "\u4e2d\u6587" echo json_encode($a, JSON_UNESCAPED_UNICODE); // "中文"
Link: http://www.cnblogs.com/farwish/p/3847845.html