backtake me backCodeIgniter Controller Names with Dashes

Feeds

RSS Feed Twitter Feed




Photostream

At North Third Reservoir looking towards Loch Lomond I'm watching you... Mr. Robin Now we're cooking! Same shot as before but closer! Added logs not for effect but to really dry them out

June

Friday

17

I prefer to use dashes with my CI2 controller names, so the below solves that problem.

Simply create a file called 'MY_Router.php' and place it in the '/application/core/' folder.

class MY_Router extends CI_Router
{
function _set_request($segments = array()) {
parent::_set_request(str_replace('-', '_', $segments));
}
}



Share on Digg Share on Facebook Share on StumbleUpon Share on Twitter

Comments are now closed