我想在我的php代码中输出一个utf8 json对象:
<?php
header('Content-type: text/html; charset=utf-8');
header('Content-Type: application/json');
$response= array();
$product = array();
$product["title"]="عنوان";
$product["nim_body"]="بدنه";
$product["writer"]="نویسنده";
array_push($response,$product);
echo json_encode($response,JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT);我的输出就像图片:

发布于 2017-01-09 21:33:35
https://stackoverflow.com/questions/41557080
复制相似问题