$content = file_get_contents("php://input");
if (!empty($content)) {
$fileType = mb_detect_encoding($content, array('UTF-8', 'GBK', 'LATIN1', 'BIG5'));
if ($fileType != 'UTF-8') {
$content = mb_convert_encoding($content, 'utf-8', $fileType);
}
}
if (!empty($content)) {
$fileType = mb_detect_encoding($content, array('UTF-8', 'GBK', 'LATIN1', 'BIG5'));
if ($fileType != 'UTF-8') {
$content = mb_convert_encoding($content, 'utf-8', $fileType);
}
}