Poll: Would you find a globally enabled profiler helpful?
You do not have permission to vote in this poll.
Yes, I would like to see a global switch for enabling the profiler
57.14%
8 57.14%
No, it is fine as it is.
42.86%
6 42.86%
Total 14 vote(s) 100%
* You voted for this item. [Show Results]

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Enable profiler globally

#10
This is how I do it with a profiler.php config file.

Top of index.php or some place else.

index.php
PHP Code:
/**
 * ------------------------------------------------------------------------
 * Profiler - true / false set to true to enable.
 * ------------------------------------------------------------------------
 */
define('PROFILER'false); 

MY_Controller
PHP Code:
    /**
     * --------------------------------------------------------------------
     * __construct()
     *
     * Class    Constuctor PHP 5+
     *
     * @access      public
     * @internal    param $string
     * @return      \Base_Controller
     */
    
public function __construct()
    {
        
parent::__construct();

        
// use profiler
        
$this->output->enable_profiler(PROFILER);
        } 
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Messages In This Thread
Enable profiler globally - by PaulD - 04-29-2015, 02:56 AM
RE: Enable profiler globally - by mwhitney - 04-29-2015, 06:40 AM
RE: Enable profiler globally - by gadelat - 04-29-2015, 11:23 AM
RE: Enable profiler globally - by CroNiX - 04-29-2015, 01:46 PM
RE: Enable profiler globally - by gadelat - 04-29-2015, 01:50 PM
RE: Enable profiler globally - by PaulD - 04-29-2015, 01:58 PM
RE: Enable profiler globally - by ivantcholakov - 04-29-2015, 03:32 PM
RE: Enable profiler globally - by ivantcholakov - 04-29-2015, 03:36 PM
RE: Enable profiler globally - by ivantcholakov - 04-29-2015, 04:38 PM
RE: Enable profiler globally - by InsiteFX - 04-29-2015, 06:07 PM
RE: Enable profiler globally - by John_Betong - 04-29-2015, 07:22 PM
RE: Enable profiler globally - by PaulD - 04-30-2015, 05:17 AM
RE: Enable profiler globally - by PaulD - 04-30-2015, 05:15 AM
RE: Enable profiler globally - by ivantcholakov - 04-30-2015, 10:52 AM
RE: Enable profiler globally - by InsiteFX - 05-01-2015, 01:12 AM
RE: Enable profiler globally - by RWCH - 05-01-2015, 06:08 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.