Possible Duplicate:
correct HTTP header for json file
I have set the header of a php file using the following line:
header('Content-Type', 'application/json');
The server fails with the error message:
"Tue Oct 23 16:20:09 2012] [error] [client 111.111.111.111] malformed header from script. Bad header=Content-Type: xyz.php, referer:...."
I followed some advice on the web to add this to an .htaccess file
AddType application/json .json
Neither have worked. I’d be grateful for any further assistance.
1 Answer