How to get current url with query string in codeigniter?By Hardik Savani | August 29, 2016 | | 1282 Viewer | Category : Codeigniter
Share this post:
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;
- How to redirect to external link with laravel 5?
- Laravel 5 - Paypal Payment Integration example using netshell/paypal package from scratch
- How to get file size from URL in Laravel 5?
- Laravel 5 - How to get route parameters in your route middleware?
- How to create middleware for XSS protection in laravel 5?
- How to get year, month and day from timestamp date using carbon in Laravel 5?
- Jquery Select2 - Select box with search example code
- How to solve - you dont have permission to upload files in KCFinder ?