How to get current url with query string in codeigniter?By Hardik Savani | August 29, 2016 | | 4098 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;
- Laravel 5 File(Image) Upload Example with Validation
- Laravel 5 - Google reCaptcha code and Validation example using anhskohbo/no-captcha package
- PHP - File upload progress bar with percentage using form jquery example
- Solve - Installation request for guzzle/guzzle in laravel
- AngularJS - How to Limit String Length using Filter?
- Mediafire PHP file uploading and get link example
- Codeigniter 3 and AngularJS CRUD with Search and Pagination Example.
- How to get Instagram followers count using JQuery Ajax?