Reputation: 2968
Anybody know, how to get url array params outside controller (for example bootstrap.php)?
Upvotes: 0
Views: 771
Reputation: 34857
CakePHP is still PHP at the end of the day, so you can use any valid PHP method to achieve this. Like:
if (!empty($_SERVER['QUERY_STRING'])) {
// A querystring was set...
}
Or
$url = parse_url($_SERVER['REQUEST_URI']);
if (!empty($url['query'])) {
// A querystring was set...
}
After that you can do anything else that you want to do.
Upvotes: 1