profiler.php - Create this file in application/config
PHP Code:
<?php
defined('BASEPATH') OR 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; // Elapsed time of Benchmark points and total execution time.
$config['config'] = TRUE; // CodeIgniter Config variables.
$config['controller_info'] = TRUE; // The Controller class and method requested.
$config['get'] = TRUE; // Any GET data passed in the request.
$config['http_headers'] = TRUE; // The HTTP headers for the current request.
$config['memory_usage'] = TRUE; // Amount of memory consumed by the current request, in bytes.
$config['post'] = TRUE; // Any POST data passed in the request.
$config['queries'] = TRUE; // Listing of all database queries executed, including execution time.
$config['uri_string'] = TRUE; // The URI of the current request.
$config['session_data'] = TRUE; // Data stored in the current session.
$config['query_toggle_count'] = 25; // The number of queries after which the query block will default to hidden.
/**
* ------------------------------------------------------------------------
* Filename: profiler.php
* Location: ./application/config/profiler.php
* ------------------------------------------------------------------------
*/
config.php - Add to the top of file
PHP Code:
/*
|--------------------------------------------------------------------------
| Use CodeIgniter Profiler
|--------------------------------------------------------------------------
|
/ TRUE / FALSE
|
*/
$config['profiler'] = FALSE;
MY_Controller
PHP Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* ------------------------------------------------------------------------
* Editor : phpDesigner 8.1.2
* Date : 10/17/2013
* Time : 9:07:10 AM
* Authors : Raymond L King Sr.
* ------------------------------------------------------------------------
*
* Class MY_Controller
*
* ------------------------------------------------------------------------
* To change this template use File | Settings | File Templates.
* ------------------------------------------------------------------------
*/
class Base_Controller extends CI_Controller {
/**
* --------------------------------------------------------------------
* Class variables - public, private, protected and static.
* --------------------------------------------------------------------
*/
// --------------------------------------------------------------------
/**
* __construct
*
* Class Constructor PHP 5+
*
* @access public
* @return void
*/
public function __construct()
{
parent::__construct();
// check to see if we want to use the CI profiler.
$this->output->enable_profiler($this->config->item('profiler'));
}
}
Quick and simple
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )