dongpao1921 2014-10-07 07:19
浏览 18

当前字符集:utf8作为响应

Where is the debug information "Current character set: utf8" comming from?

It appears always first when I echoing something within my index.php (slim) script.

I really become desperate trying to suppress this.

May it caused by the .htaccess rules?

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ %{ENV:BASE}index.php [QSA,L]

Here my setting:

Server: Apache/2.4.9 (Win32) OpenSSL/1.0.1g PHP/5.5.11 X-Powered-By: PHP/5.5.11 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 Safari/537.36

The relevant section of the index.php:

function echoRespnse($status_code, $response) {
$app = \Slim\Slim::getInstance();
// Http response code
$app->status($status_code);
$app->config('debug', false);

// setting response content type to json
$app->contentType('application/json');
//$app->response()->header('Content-Type', 'application/json');

echo json_encode($response);
}

Any help would be greatly appreciated

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?
    • ¥15 求daily translation(DT)偏差订正方法的代码
    • ¥15 js调用html页面需要隐藏某个按钮
    • ¥15 ads仿真结果在圆图上是怎么读数的
    • ¥20 Cotex M3的调试和程序执行方式是什么样的?
    • ¥20 java项目连接sqlserver时报ssl相关错误
    • ¥15 一道python难题3
    • ¥15 牛顿斯科特系数表表示
    • ¥15 arduino 步进电机
    • ¥20 程序进入HardFault_Handler