Last Updated: February 25, 2016
·
261
· teknonono

debug php

 /*add in front of code to show all erros */
error_reporting(E_ALL);
ini_set("display_errors", 1);

/* kkk */
$fp = fopen("/tmp/kurtdebug", "w");
$str = '';

ob_start();
var_dump($var);
$vardump = ob_get_clean();
$str .= 'vardump: '.$vardump."\n";

$str .= ' :'.$var->$para.' : '.$var->$para;

foreach ($array as $key => $val) {
     echo "$key = $val\n";
 }

fwrite($fp, $str. "\n");
fclose($fp);