泽黻鲨: Debug

泽黻鲨 debug(), 镱玮铍弪 噔蝾痂珙忄眄 噤扈龛耱疣蝾疣 忤溴螯 耦溴疰帙桢 爨耨桠圊 觐祜铐屙蝾 ( 礤 蝾朦觐) 溧眄.

妈溴螯 溧眄簋 蜞犭桷 祛驽 蝾朦觐 噤扈龛耱疣蝾 (团 噔蝾痂珙忄眄 镱朦珙忄蝈朦 桦 桧 - 团 祛泱).

脏牝梓羼觇,  耱桦桤钼囗睇 漕疣犷蜞眄 HTML-蝈 <pre></pre>.



function debug($var)
{
    global $USER;
    if ($USER->IsAdmin()) {
        $bt = debug_backtrace();
        $bt = $bt[0];
        $dRoot = $_SERVER["DOCUMENT_ROOT"];
        $dRoot = str_replace("/", "\\", $dRoot);
        $bt["file"] = str_replace($dRoot, "", $bt["file"]);
        $dRoot = str_replace("\\", "/", $dRoot);
        $bt["file"] = str_replace($dRoot, "", $bt["file"]);
   
     //戾耱 潆 html 觐溧

    }
}
 
翌 襦禧 HTML-觐
Debug(). Html code
玎牮

悟镳噔栩 玎怅

篷腓 黩-蝾 镱 礤 蜞, 桦 蔓 麇-蝾 礤 筲屦屙. 袜镳桁屦 耢脲 耦狁蜮屙眍 骅珥. 橡铖蝾 磬骒栩 磬 腩泐蜩 襦轵 镱怛铕栩 镱稃蜿. 愉圜!