mirror of
https://github.com/dg/dibi.git
synced 2025-07-31 03:10:14 +02:00
removed support for FirePHP
This commit is contained in:
@@ -13,9 +13,6 @@ Tracy\Debugger::enable();
|
||||
$dibi = new Dibi\Connection([
|
||||
'driver' => 'sqlite3',
|
||||
'database' => 'data/sample.s3db',
|
||||
'profiler' => [
|
||||
'run' => true,
|
||||
],
|
||||
]);
|
||||
|
||||
|
||||
|
@@ -13,9 +13,6 @@ Tracy\Debugger::enable();
|
||||
$dibi = new Dibi\Connection([
|
||||
'driver' => 'sqlite3',
|
||||
'database' => 'data/sample.s3db',
|
||||
'profiler' => [
|
||||
'run' => true,
|
||||
],
|
||||
]);
|
||||
|
||||
|
||||
|
@@ -19,8 +19,7 @@ $dibi = new Dibi\Connection([
|
||||
'database' => 'data/sample.s3db',
|
||||
// enable query logging to this file
|
||||
'profiler' => [
|
||||
'run' => true,
|
||||
'file' => 'data/log.sql',
|
||||
'file' => 'log/log.sql',
|
||||
],
|
||||
]);
|
||||
|
||||
@@ -37,6 +36,6 @@ try {
|
||||
|
||||
|
||||
// outputs a log file
|
||||
echo '<h2>File data/log.sql:</h2>';
|
||||
echo '<h2>File log/log.sql:</h2>';
|
||||
|
||||
echo '<pre>', file_get_contents('data/log.sql'), '</pre>';
|
||||
echo '<pre>', file_get_contents('log/log.sql'), '</pre>';
|
||||
|
@@ -1,47 +0,0 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
ob_start(); // needed by FirePHP
|
||||
?>
|
||||
<!DOCTYPE html><link rel="stylesheet" href="data/style.css">
|
||||
|
||||
<h1>Using Profiler | dibi</h1>
|
||||
|
||||
<?php
|
||||
|
||||
if (@!include __DIR__ . '/../vendor/autoload.php') {
|
||||
die('Install packages using `composer install`');
|
||||
}
|
||||
|
||||
|
||||
$dibi = new Dibi\Connection([
|
||||
'driver' => 'sqlite3',
|
||||
'database' => 'data/sample.s3db',
|
||||
'profiler' => [
|
||||
'run' => true,
|
||||
],
|
||||
]);
|
||||
|
||||
|
||||
// execute some queries...
|
||||
for ($i = 0; $i < 20; $i++) {
|
||||
$res = $dibi->query('SELECT * FROM [customers] WHERE [customer_id] < ?', $i);
|
||||
}
|
||||
|
||||
// display output
|
||||
?>
|
||||
<p>Last query: <strong><?= dibi::$sql; ?></strong></p>
|
||||
|
||||
<p>Number of queries: <strong><?= dibi::$numOfQueries; ?></strong></p>
|
||||
|
||||
<p>Elapsed time for last query: <strong><?= sprintf('%0.3f', dibi::$elapsedTime * 1000); ?> ms</strong></p>
|
||||
|
||||
<p>Total elapsed time: <strong><?= sprintf('%0.3f', dibi::$totalTime * 1000); ?> ms</strong></p>
|
||||
|
||||
<br>
|
||||
|
||||
<p>Dibi can log to your Firebug Console. You first need to install the Firefox, Firebug and FirePHP extensions. You can install them from here:</p>
|
||||
|
||||
<ul>
|
||||
<li>Firebug: https://addons.mozilla.org/en-US/firefox/addon/1843
|
||||
<li>FirePHP: http://www.firephp.org/
|
||||
</ul>
|
Reference in New Issue
Block a user