Welcome Guest, Not a member yet? Register   Sign In
How can I check the uri segment?
#1

How can I check the uri segment?
In Ci3, it was possible to check

Code:
$this->uri->segment(2);
Reply
#2

The "CI4 way" is simialr ... https://codeigniter4.github.io/CodeIgnit...equest-url
Reply
#3

He asked, he answered.
$ uri = current_url (true);
$ class_open = $ uri-> getSegment (2);
Understood.
Reply
#4

(This post was last modified: 01-08-2019, 06:04 PM by titounnes.)

try this.
$this->request->uri->getSegment(2);
Reply
#5

Most likely, this method will be best $data['current_uri'] = $this->uri->segment(1).
It helped me. Try it, then write.=))
Work out!
Reply




Theme © iAndrew 2016 - Forum software by © MyBB