Thursday, December 3, 2009

PHP Content-type: text/plain for Ajax

<?php

header('Content-type: text/plain');
if (!$_POST && !$_GET)  { print "\nhello\n";}
if ($_GET['test'] || $_POST['test'] ) {
print_r($_POST);
print_r($_GET);
}

?>