//默认类型html
header('Content-Type: text/html; charset=utf-8');

//json类型
header('Content-Type: application/json; charset=utf-8');

//txt类型
header("Content-Type: text/plain; charset=utf-8");