php打印

//打印
function p($arr='1',$type='0'){
    $array = debug_backtrace();
    $num = 1;
    $html='';
    foreach ($array as $k=>$row) {
        if(!empty($row['file'])){
            $html .= "【{$k}】".$row['file'] . ' : [' . $row['line'] . '行]     调用方法 :  ' . $row['function'] . "()<br>";
        }
    }
    echo $html;
    echo '<pre>';
    print_r($arr);
    echo '</pre>';
    if($type == 0){
        die;
    }
}
点赞

发表评论