Warning: Invalid argument supplied for foreach() in /home/jihswbiz/public_html/t6.gwilt.org/refDox.php on line 212
Docs-prtv

 

ReLoad

Keys


Functions

arraybrowsercolorcookiedatetimeDBdebugdeviceDSTequiverrorflagsfontformatgeo
holidayhtmlisjsonmathparsePHPprintsearchsortstringtabletexttracetype
VOTDweatherxml

Function  prtv   Lines 998-1041 (43 lines)???: 1969-12-31 file  utilsDebug.php   Last mod: Mon 2021-05-03 17:55:24

function prtv $str$prt=true )
        {
#-k     print   debug
#-              dump a variable & all related info to log file
#-              if $prt == false, we just want to build the string and return it
#-d             4/7/12  - returns output str

        
global $logfcb;
        
$t $logfcb['log']['t'] . ' ';

        
$L '';
        if (
is_bool($ar[$ii]['cont']))  { $L "; bool) = [" . (boolval($str) ? 'bool-true' 'bool-false') . "]"; }
        elseif (
is_scalar($str))        { $L "; len=" strlen($str) . ") = [" $str "]"; }
        elseif (!
strlen($str))          { $L "; len = 0)"; }
        else                            { 
$L ") = {\n" print_r($str,true) . "\n}"; }

        
$raw debug_backtrace();
        
$raw[]['function'] = 'MAIN';

        for (
$i=0;$i<count($raw);$i++)
                
$raw[$i]['fname'] = substr $raw[$i]['file'], strrpos ($raw[$i]['file'],'/')+);

#       for ($i=count($raw)-2;$i>=0;$i--)
#               $hdr .= $raw[$i+1]['function'] . "@'" . $raw[$i]['fname'] . '[' . $raw[$i]['line'] . "]' ";
        
$hdr pathinfo (callingPath());
        
$callingFile file $raw[0]['file'] );
        
$theLine $callingFile[$raw[0]['line']-1];
        
$x strpos $theLine,'(' )+1;
        
$y strrpos $theLine,')' );
        
$var trim(substr $theLine,$x,$y-$x ));
        
$var str_replace'<''&lsaquo;'$var );

        
$logmsg date('Y-m-d H:i:s') . $t $hdr['basename'] . $var '(type: ' is($str) . $L "\n";

        if (
$prt)
                {
                
$cnt fwrite $logfcb['log']['f'], $logmsg );
                if (!
$cnt)
                        echo 
str_replace "\n"'<br>''LOGFILE ERROR FALLBACK<pre>'.$logmsg.'</pre>' );      # log i/o failed; dump to screen
                
}

        return 
$logmsg;
        }

?>