How to get current url with query string in codeigniter?By Hardik Savani | August 29, 2016 | | 12029 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;
- How to send mail using zoho smtp server in PHP Laravel?
- Laravel 5 File(Image) Upload Example with Validation
- Laravel 5.5 - Validation Data Return - New Feature
- AngularJS - how to remove html tags using filter?
- How to add Delete cascade to existing column in Laravel 5, without remove column?
- AngularJS - How to create read more/less toggle using Directive?
- Custom User Log Activity in Laravel 5 App Example
- How to connect mysql database in node js with example?