diff options
author | Luke Bratch <l_bratch@yahoo.co.uk> | 2014-07-25 11:03:39 +0100 |
---|---|---|
committer | Luke Bratch <l_bratch@yahoo.co.uk> | 2014-07-25 11:03:39 +0100 |
commit | 65af1e7eedacaa724c0f3f83ac69ca8bd2466442 (patch) | |
tree | 35bbbd53f01e66548f29dbd9b1f141925a358570 | |
parent | bbf9995ea023fe928fa9906edf50f6475f841b5a (diff) |
Set the correct content type for JSON output
-rw-r--r-- | index.php | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -303,6 +303,8 @@ for ($i = 0; $i < count($listing); $i++) { </body></html> <?php } else if ($_GET['format'] == "json") { + header("Content-type: application/json"); + echo json_encode($listing); } else if ($_GET['format'] == "raw") { print_r($listing); |