How to fix this PHP error?

encogebem

New Member
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... \[code\]//start new page timer object$profiler = new Profiler;$profiler->start();\[/code\]After a bunch of other files are compiled, I then include a file into the footer section, in this file I run this code, \[code\]echo 'Page Generated in ' .$profiler->end(). ' of a second with ' .$_SESSION['querie_counter']. ' MySQL Queries';\[/code\]However I am getting this error message in the footer file now, \[quote\] 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\[/quote\]How can I fix this?
 
Back
Top