I have a header method that shows in the top of a page, it is inside a class, inside my header() method I run this code here to start a new Profiler object...
//start new page timer object
$profiler = new Profiler;
$profiler->start();
After a bunch of other files are compiled, I then include a file into the footer section, in this file I run this code,
echo 'Page Generated in ' .$profiler->end(). ' of a second with ' .$_SESSION['querie_counter']. ' MySQL Queries';
However I am getting this error message in the footer file now,
Notice: Undefined variable: profiler in C:\webserver\htdocs\friendproject2\includes\footer.inc.php on line 21
Fatal error: Call to a member function end() on a non-object in C:\webserver\htdocs\friendproject2\includes\footer.inc.php on line 21
How can I fix this?