CakePHP – Get Controller, Action, URL information

If you want to know the controller, action or URL in CakePHP just use the default associative array

$params

that looks similar to this

Array (
[controller] => my_controller_name
[action] => my_action_name
[url] => Array ( 
[url] => my_cake-php_url 
)
)

Leave a Reply