CodeIgniter Forums

Full Version: How can I check the uri segment?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How can I check the uri segment?
In Ci3, it was possible to check

Code:
$this->uri->segment(2);
He asked, he answered.
$ uri = current_url (true);
$ class_open = $ uri-> getSegment (2);
Understood.
try this.
$this->request->uri->getSegment(2);
Most likely, this method will be best $data['current_uri'] = $this->uri->segment(1).
It helped me. Try it, then write.=))