How to get current url with query string in codeigniter?By Hardik Savani | August 29, 2016 | | 914 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;
- JQuery - Delete confirm modal using bootbox example
- Bootstrap - Jquery multiple select with checkboxes example using bootstrap-multiselect.js plugin
- How to uninstall cordova and ionic in ubuntu
- How to get Lat and Lon from google map API in Jquery PHP?
- Laravel 5.3 Image Upload with Validation example
- How to check if record exists or not in Laravel 5?
- How to get site URL in Laravel 5?
- Laravel 5.3 - Create Bootstrap Contact US Form using Form Request