How can I check the uri segment? |
How can I check the uri segment?
In Ci3, it was possible to check Code: $this->uri->segment(2);
The "CI4 way" is simialr ... https://codeigniter4.github.io/CodeIgnit...equest-url
He asked, he answered.
$ uri = current_url (true); $ class_open = $ uri-> getSegment (2); Understood.
Most likely, this method will be best $data['current_uri'] = $this->uri->segment(1).
It helped me. Try it, then write.=))
Work out!
|
Welcome Guest, Not a member yet? Register Sign In |