CodeIgniter: How to get Controller, Action, URL information
Asked 07 September, 2021
Viewed 2.1K times
  • 61
Votes

I have these URLs:

How to get controller name, action name from these URLs. I'm CodeIgniter newbie. Are there any helper function to get this info

Ex:

$params = helper_function( current_url() )

Where $params becomes something like

array (
  'controller' => 'system/settings', 
  'action' => 'edit', 
  '...'=>'...'
)

11 Answer