If Only I Knew That!

Webby things that could save you time

Archive for May, 2010

Codeigniter 2.0 configurable profiler + some jQuery magic to show/hide

with 3 comments

The new CI 2.0 Profiler has configurable sections + 2 new additional sections (http_headers and config).

You’ll need to edit application/config/profiler.php

<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
| Profiler Sections
| -------------------------------------------------------------------------
| This file lets you determine whether or not various sections of Profiler
| data are displayed when the Profiler is enabled.
| Please see the user guide for info:
|
|	http://codeigniter.com/user_guide/general/profiling.html
|
*/

$config['benchmarks'] 		= TRUE;
$config['get'] 				= TRUE;
$config['memory_usage'] 	= TRUE;
$config['post'] 			= TRUE;
$config['uri_string']		= TRUE;
$config['controller_info']	= TRUE;
$config['queries'] 			= TRUE;
$config['http_headers'] 	= TRUE;
$config['config'] 			= TRUE;

/* End of file profiler.php */
/* Location: ./application/config/profiler.php */

I previously used a modified version of MY_Profiler from dragffy.com. I modified it to add a button to the top of the page that would show or hide the profiler when needed and could also hide the profiler button totally.

Click to continue reading “Codeigniter 2.0 configurable profiler + some jQuery magic to show/hide”

Written by daveganley

May 4th, 2010 at 1:22 pm

Posted in Codeigniter,PHP

Powered by CDN Rewrites