diff --git a/Library/Think/Controller.php b/Library/Think/Controller.php index 9d5a4c0a..d86a3c4f 100644 --- a/Library/Think/Controller.php +++ b/Library/Think/Controller.php @@ -91,12 +91,12 @@ class Controller { exit(xml_encode($data)); case 'JSONP': // 返回JSON数据格式到客户端 包含状态信息 - header('Content-Type:application/json; charset=utf-8'); + header('Content-Type:application/javascript; charset=utf-8'); $handler = isset($_GET[C('var_jsonp_handler')]) ? $_GET[C('var_jsonp_handler')] : C('default_jsonp_handler'); exit($handler . '(' . json_encode($data) . ');'); case 'EVAL': // 返回可执行的js脚本 - header('Content-Type:text/html; charset=utf-8'); + header('Content-Type:application/javascript; charset=utf-8'); exit($data); default: // 用于扩展其他返回格式数据