-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: $this->request->getUri()->getPath() is not compatible with PSR-7 #7123
Comments
|
Navigate to
|
Navigate to
|
I think when |
From #7233 (comment) The inconsistency of URI Segments between <?php
namespace App\Controllers;
class Home extends BaseController
{
public function index()
{
var_dump($this->request->getUri()->getSegments());
var_dump($this->request->getUri()->getSegment(1));
$uri = current_url(true);
var_dump($uri->getSegments());
var_dump($uri->getSegment(1));
}
}
|
About PSR-7 URI::getPath(): #7252 (comment) |
Navigate to
|
Navigate to
|
I wrote above, but... But we do not distinguish the route path It seems difficult to make our URI fully compliant with PSR-7. |
Closed by #7282 |
CodeIgniter4 Version: v4.3.1
$this->request->getUri()->getPath()
returns the route (URI path relative to baseURL).When navigating to
http://localhost:8888/ci431/public/test?a=b
,Ref https://www.php-fig.org/psr/psr-7/
Related #5930
The text was updated successfully, but these errors were encountered: