So I recently installed an apache2 web server with php5, and when trying to output plain JSON, a page is generated already containing <html>
, <head>
and <body>
tags, like so:
<html>
<head></head>
<body>
{ "text": "some text" }
</body>
</html>
instead of giving me this:
{ "text": "some text" }
with my php code being:
<?php printf('{ "text": "some text" }'); ?>
I have tried looking online to find how to disable this with no result.
Any help is welcome.