Thursday, 15 January 2015

php - Current character set: utf8 in response -



php - Current character set: utf8 in response -

where debug info "current character set: utf8" comming from?

it appears first when echoing within index.php (slim) script.

i become desperate trying suppress this.

may caused .htaccess rules?

rewriteengine on rewritecond %{request_filename} !-f rewriterule ^(.*)$ %{env:base}index.php [qsa,l]

here 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, gecko) chrome/37.0.2062.124 safari/537.36

the relevant section of 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 json $app->contenttype('application/json'); //$app->response()->header('content-type', 'application/json'); echo json_encode($response); }

any help appreciated

php json apache xampp slim

No comments:

Post a Comment