时间:2021-07-01 10:21:17 帮助过:21人阅读
function dump($vars, $label = '', $return = false) {
if (ini_get('html_errors')) {
$content = "\n";\n";
if ($label != '') {
$content .= "{$label} :\n";
}
$content .= htmlspecialchars(print_r($vars, true));
$content .= "\n
} else {
$content = $label . " :\n" . print_r($vars, true);
}
if ($return) { return $content; }
echo $content;
return null;
}
http://www.bkjia.com/PHPjc/728103.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/728103.htmlTechArticle这个很早就有了,比php自带的var_dump好用多了。 代码如下:
function dump($vars, $label = '', $return = false) { if (ini_get('html_errors')) { $content...