How to get current url with query string in codeigniter?By Hardik Savani | August 29, 2016 | | 17044 Viewer | Category : Codeigniter
If you require to get current URL with parameters in your codeigniter project then you can get easily using "url" helper. Codeigniter provide url helper library that way we can get existing page url or base url etc. you can also get only parameters without URL using "input" as like bellow.
$parameters = $this->input->get();
But, we are getting full path using "url" helper and $_SERVER variable. So, you can see how to get full path using both as bellow:
$currentURL = current_url();
$params = $_SERVER['QUERY_STRING'];
$fullURL = $currentURL . '?' . $params;
- Laravel 5 - How to create API Authentication using Passport ?
- Solved Issue - "/usr/bin/env: ‘node’: No such file or directory"
- Laravel 5 Redirect to URL using redirect() helper
- How to implement Email Verification with Activation Code example from Scratch in Laravel 5.2 ?
- Laravel 5 mailchimp api integration from scratch with example
- How to create a text file for JSON and file download in Laravel 5?
- How to use where clause with mysql function in Laravel 5?
- How to create Queue with Mail in Laravel 5 ?