1, formatted display dump information:
Dump yourself and imitate thinkphp's dump.
format var_dump function p ($var, $echo =true, $label =null, $ strict=true) { echo "<br>"; $label = ($label ===null) ? ' : RTrim ($label). ' '; if (! $strict) { if (Ini_get (' html_errors ')) { $output = print_r ($var, true); $ output = "<pre>". $label. Htmlspecialchars ($output, ent_quotes). " </pre> "; } else { $output = $label . " : " . print_r ($var, true); } }else { ob_start (); var_dump ($var); $output = ob_get_clean (); if (!extension_loaded (' Xdebug ')) { $output = preg_replace ("/\]\=\>\n (\s+)/M", "] => ", $output); $output = ' <pre> ' . $label. htmlspecialchars ($output, ent_quotes) . ' </pre> '; } } if ($echo) { echo ($output); return null; }else return $output; }
2, take Thinkphp's smiley face, to Smarty
<! doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "HTTP// Www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">