If Only I Knew That!

Webby things that could save you time

Archive for April, 2010

Quick and easy block commenting for testing

with 3 comments

To save time commenting and uncommenting during development we use a little trick with the comment block that allows us to add or remove a single character ‘\’ to comment/uncomment a block.

Uncommented

/* */
Block of code
/* */

Commented

/* *\/
Block of code
/* */

Quick and simple time saver

Written by daveganley

April 21st, 2010 at 4:25 pm

Posted in PHP

CI-1.7.2 to CI-2.0 Model compatibility tweak

without comments

Spotted this in Ben Edmunds Ion Auth model, great way of making your models CI-1.7.2+ compatible.

//  CI 2.0 Compatibility
if(!class_exists('CI_Model')) { class CI_Model extends Model {} }

class MY_Model extends CI_Model
{
}

Written by daveganley

April 13th, 2010 at 10:58 am

Posted in Codeigniter

Powered by CDN Rewrites