CodeIgniter Profiler: Globally Enable/Disable

Here is a quick tip for users of the CodeIgniter PHP Framework (and a reminder to myself). If you wish to enable or disable the profiler globally while developing your application (as opposed to changing the value in each seperate controller), you can do the following.

1. Open the config.php file in the application/config/ folder.
2. Add a new config setting using the following code:

| Globally Enable/Disable Profiler
| TRUE  = On
| FALSE = Off
$config['profiler_status'] = TRUE;

3. Then in each of the controllers that you want to the profiler to be displayed on, add the following code to the constructor.


Note: If you prefer to only have the profiler be displayed on some methods, then place the code from step 3 above into each of the methods.

HopeĀ  this helps :)

PHP Frameworks

Recently I’ve been toying with the idea of using a PHP framework to help with the development of my web sites. The problem is, I don’t know which one to choose :(

Some of the frameworks I’ve been looking at include:

Each has there own unique advantages, but what is the best way to decide which one suits my needs the best?