CodeIgniter Forums
Display profiler data - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Display profiler data (/thread-13217.html)



Display profiler data - El Forum - 11-14-2008

[eluser]fatnic[/eluser]
Hello.

Is it possible to get the profiler data without displaying it at the bottom of the page?

I want to show some of the profiler info (execution time, queries used) on my page but in a custom div.

Is it possible?


Display profiler data - El Forum - 11-15-2008

[eluser]OES[/eluser]
Well I have not done this myself but just to get you started if you look at the profiler.php in system library the final function is the run command.

It outputs the profile into a div.

Code:
$output = "<div id='codeigniter_profiler' style='clear:both;background-color:#fff;padding:10px;'>";

So if you wanted that to display somewhere else on your page just change the css values or do it by #codeigniter_profiler in the css.

Then if you didnt want all profile messages just comment out the ones you didnt want within the run function.

Good Luck!