PHP debug

| |
[不指定 2010/01/05 10:25 | by phpor ]
<?php

c
();
function 
c() {
    
d("error is here");
}

function 
d($msg) {
    
$e = new Exception();
    
//print_r($e->getTrace());
    
$arr $e->getTrace();
    echo 
time().":".$arr[0]["file"].":".$arr[0]["line"].":".$arr[1]["function"]."n";
    echo 
$msg;
    echo 
"n";
}


?>
数据存储 » PHP | 评论(0) | 引用(0) | 阅读(99)
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]