2013-06-08 01:32:10 +07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
include 'bootstrap.php';
|
|
|
|
|
|
|
|
$debugbar['messages']->addMessage('hello');
|
|
|
|
|
|
|
|
$debugbar['time']->startMeasure('op1', 'sleep 500');
|
|
|
|
usleep(300);
|
|
|
|
$debugbar['time']->startMeasure('op2', 'sleep 400');
|
|
|
|
usleep(200);
|
|
|
|
$debugbar['time']->stopMeasure('op1');
|
|
|
|
usleep(200);
|
|
|
|
$debugbar['time']->stopMeasure('op2');
|
|
|
|
|
2013-06-13 19:24:39 +08:00
|
|
|
$debugbar['messages']->addMessage('world', 'warning');
|
2013-06-08 01:32:10 +07:00
|
|
|
$debugbar['messages']->addMessage(array('toto' => array('titi', 'tata')));
|
|
|
|
$debugbar['messages']->addMessage('oups', 'error');
|
|
|
|
|
|
|
|
$debugbar['time']->startMeasure('render');
|
|
|
|
?>
|
|
|
|
<html>
|
|
|
|
<head>
|
2013-06-13 18:48:23 +08:00
|
|
|
<?php echo $debugbarRenderer->renderHead() ?>
|
2013-06-08 01:32:10 +07:00
|
|
|
<script type="text/javascript">
|
|
|
|
$(function() {
|
|
|
|
$('.ajax').click(function() {
|
|
|
|
var container = $(this).parent().html('...');
|
|
|
|
$.get(this.href, function(data) {
|
|
|
|
container.html(data);
|
|
|
|
});
|
|
|
|
return false;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<p>PhpDebugBar Demo</p>
|
|
|
|
<p><a href="demo_ajax.php" class="ajax">load ajax content</a></p>
|
|
|
|
<p><a href="demo_ajax_exception.php" class="ajax">load ajax content with exception</a></p>
|
|
|
|
<?php
|
|
|
|
usleep(100);
|
2013-06-13 18:48:23 +08:00
|
|
|
echo $debugbarRenderer->render();
|
2013-06-08 01:32:10 +07:00
|
|
|
?>
|
|
|
|
</body>
|
|
|
|
</html>
|