Intresting PHP Error
No No No... It's not the bug
So here's the sample code from the page
PHP Code:
<?
// Page statistic functions
// == Start
function query($q)
{
global $num_q;
$num_q++;
$res = mysql_query($q);
db_error($res);
return $res;
}
function create_time_end($starttime)
{
$mtime = microtime();
$mtime = explode(" ",$mtime);
$mtime = $mtime[1] + $mtime[0];
$endtime = $mtime;
$totaltime = ($endtime - $starttime);
$totaltime = number_format($totaltime, 5);
return $totaltime;
}
function create_time_start()
{
$mtime = microtime();
$mtime = explode(" ",$mtime);
$mtime = $mtime[1] + $mtime[0];
$starttime = $mtime;
return $starttime;
}
// == End
Simply Stuff...
Now here is the error...
Code:
Fatal error: Cannot redeclare query() (previously declared in /public_html/bb/function.php:6) in /public_html/bb/function.php on line 6
Any suggestions anyone?