示例#1
0
    /**
     * Format backtrace information as HTML
     */
    public function toHtml()
    {
        ob_start();
        ?>
	<table border="1">
		<tr>
			<th>File</th><th>Line</th><th>Function</th>
		</tr>
		<?php 
        foreach ($this->info as $thisRow) {
            $lineInfo = FormateBacktraceLineHtml($thisRow);
            ?>
<tr>
			<td><?php 
            echo $lineInfo['file'];
            ?>
</td>
			<td><?php 
            echo $lineInfo['line'];
            ?>
</td>
			<td><?php 
            echo $lineInfo['function'];
            ?>
</td>
		</tr>
		<?php 
        }
        ?>
	</table>
	<?php 
        return ob_get_clean();
    }
示例#2
0
/**
 * Generates and prints backtrace information in readable HTML
 *
 * @param debug_backtrace() $backtraceInfo The results of a debug_backtrace() function call
 */
function FormatBacktraceHtml($backtraceInfo)
{
    // debug_print_backtrace();
    // return;
    //echo_r($backtraceInfo);
    ?>
<table border="1">
	<tr>
		<th>File</th><th>Line</th><th>Function</th>
	</tr>
	<?php 
    foreach ($backtraceInfo as $thisRow) {
        $lineInfo = FormateBacktraceLineHtml($thisRow);
        ?>
<tr>
		<td><?php 
        echo $lineInfo['file'];
        ?>
</td>
		<td><?php 
        echo $lineInfo['line'];
        ?>
</td>
		<td><?php 
        echo $lineInfo['function'];
        ?>
</td>
	</tr>
	<?php 
    }
    ?>
</table>
<?php 
}