Different values from current_url and service('uri') |
I came across some strange behavior between two similar functions. Why isn't base_url returned with the second call (current_url)?
service('uri') Code: $uri = service('uri'); current_url(true) Code: $uri2 = current_url(true);
Thank you. I created an issue: https://github.com/codeigniter4/CodeIgni...ssues/7296
The current code around URI is complicated. Both are the same current URI, so the values should be the same. But some values are not the same.
By the way, what do you want for the current URI?
When you navigate to http://localhost:8080/, is the current URI http://localhost:8080/ or http://localhost:8080/index.php when indexPage is 'index.php'? |
Welcome Guest, Not a member yet? Register Sign In |