Rozdiely pre phpWebLogAnalyzer/test.php medzi verziami 1.6 a 1.7
| verzia 1.6, 2002/02/28 20:35:47 |
verzia 1.7, 2002/03/18 23:24:37 |
|
|
| <?php |
<?php |
| |
|
| |
//error_reporting (E_ALL ^ E_NOTICE); |
| |
|
| |
// this function will handle all errors reported by PHP |
| |
function php_error_handler($errno, $errstr, $errfile, $errline) |
| |
{ |
| |
echo "<table bgcolor=lightblue>"; |
| |
echo "<tr><th colspan=2>"; |
| |
echo "This is nice error"; |
| |
echo "</th></tr>"; |
| |
|
| |
foreach(array( |
| |
'file' => $errfile, |
| |
'line' => $errline, |
| |
'code' => $errno, |
| |
'message' => $errstr) |
| |
as $key => $val) { |
| |
|
| |
echo "<tr><td>"; |
| |
echo "<b>".htmlspecialchars($key)."</b>"; |
| |
echo "</td><td>"; |
| |
echo htmlspecialchars($val); |
| |
echo "</td></tr>"; |
| |
} |
| |
|
| |
die(); |
| |
} |
| |
|
| |
set_error_handler ('php_error_handler'); |
| |
|
| |
function pear_error_handler($err_obj) |
| |
{ |
| |
$error_string = $err_obj->getMessage() . ' | ' . $err_obj->getDebugInfo(); |
| |
|
| |
trigger_error($error_string, E_USER_ERROR); |
| |
} |
| |
|
| function get_mtime() |
function get_mtime() |
| { |
{ |
| $mtime = microtime(); |
$mtime = microtime(); |
| Riadok 13 $start_time = get_mtime(); |
|
| Riadok 49 $start_time = get_mtime(); |
|
| |
|
| include("./phpWebLogAnalyzer.inc.php"); |
include("./phpWebLogAnalyzer.inc.php"); |
| |
|
| |
PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'pear_error_handler'); |
| |
|
| $weblog = new Web_Log("mysql://test:test@localhost/test"); |
$weblog = new Web_Log("mysql://test:test@localhost/test"); |
| |
|
| $weblog->enableRawLog(); |
$weblog->enableRawLog(); |
Platon Group <platon@platon.sk> http://platon.sk/
|
|