update index.php to support responseType=text