Archive for April, 2010
Quick and easy block commenting for testing
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
CI-1.7.2 to CI-2.0 Model compatibility tweak
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
{
}