Skip to content

underblob

<アンダブロッブ />

Tag: JSON

HTTP Header for JSON

To print JSON for consumption by AJAX or other web services, change the HTTP headers before output:

<?php
	header( 'Content-type: application/json' );
	echo json_encode( $json );
?>
Author underblobPosted on 2012.02.252012.02.25Categories TechTags code, HTTP, JSON, PHP
underblob Proudly powered by WordPress