Codeigniter - How to get current url in controller or view ?By Hardik Savani | August 2, 2016 | | 6305 Viewer | Category : Codeigniter
Sometimes, we need to get current URL path in your controller file or view file. So, we can get simply using "url" helper. Codeigniter provide url helper library that way we can get existing page url or base url etc.
current_url() through we can get current url in your Codeigniter application. But, you should load "url" helper before use current_url(). you can load url helper as bellow:
In bellow example, you can see code how can i get current url in your controller file. So, let's see.
$currentURL = current_url();
- AngularJS - update bind ng-model input value from Jquery Code
- GROUP_CONCAT with different SEPARATOR in laravel Example
- PHP AngularJS CRUD with Search and Pagination Example From Scratch
- Simple PHP Ajax Form Validation Example from scratch
- AngularJS - How to Limit String Length using Filter?
- PHP MySQL confirmation box before delete record using jquery ajax
- Laravel 5 File(Image) Upload Example with Validation
- How to redirect to external link with laravel 5?