How to get current url with query string in codeigniter?By Hardik Savani | August 29, 2016 | | 5178 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 Redirect to URL using redirect() helper
- Example of trigger on after delete with update query mysql
- How to upload image with validation in PHP Codeigniter?
- How to Solve overwrite index.php in windows wampserver ?
- How to get current page url in PHP?
- Laravel - How to search with comma separated values using Query Builder ?
- Laravel 5.2 - User ACL Roles and Permissions with Middleware using entrust from Scratch Tutorial
- How to add query string automatically on laravel pagination links ?