标签云

微信群

扫码加入我们

WeChat QR Code

Possible Duplicate:
The right JSON content type?

i have problem on json it is only displaying " Content-Type: text/html" i am testing on localhost and my online code is

header('Access-Control-Allow-Origin: *');

header('Content-Type: application/javascript');
//header('Content-type: text/javascript');
//header('Content-type: application/json');


why do you not use application/json?

2018年07月17日05分00秒

uncomment last line

2018年07月18日05分00秒

Duplicate

2018年07月17日05分00秒

it is not working

2018年07月17日05分00秒

user1709424 can you post some code??

2018年07月18日05分00秒

<?php require 'include/jamroom-include.inc.php'; header('Access-Control-Allow-Origin: '); //header('Access-Control-Allow-Methods: *'); //content header header('Content-Type: application/javascript'); header('Content-type: text/'); header('Content-type: application/*'); header('Content-Type: application/json'); header('Content-Type: application/x-javascript'); header('Content-Type: text/javascript'); header('Content-Type: text/x-javascript'); header('Content-Type: text/x-json');

2018年07月17日05分00秒

why are you inserting this much of header only put this header header('Content-type: application/json'); for getting json output data.

2018年07月17日05分00秒