We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
CodeIgniter Version: 4.3.2
<?php namespace App\Controllers; class Home extends BaseController { public function index() { $uri1 = $this->request->getUri(); var_dump($uri1); $uri2 = current_url(true); var_dump($uri2); } }
From: https://forum.codeigniter.com/showthread.php?tid=86872
baseURL: http://localhost:8080/ → null segments: [] → ['index.php'] path: / → '/index.php/'
http://localhost:8080/
null
[]
['index.php']
/
'/index.php/'
/Users/kenji/work/codeigniter/official/CodeIgniter4/app/Controllers/Home.php:10: object(CodeIgniter\HTTP\URI)[13] protected 'uriString' => null private ?string 'baseURL' => string 'http://localhost:8080/' (length=22) protected 'segments' => array (size=0) empty protected 'scheme' => string 'http' (length=4) protected 'user' => null protected 'password' => null protected 'host' => string 'localhost' (length=9) protected 'port' => int 8080 protected 'path' => string '/' (length=1) protected 'fragment' => string '' (length=0) protected 'query' => array (size=0) empty protected 'defaultPorts' => array (size=4) 'http' => int 80 'https' => int 443 'ftp' => int 21 'sftp' => int 22 protected 'showPassword' => boolean false protected 'silent' => boolean false protected 'rawQueryString' => boolean false /Users/kenji/work/codeigniter/official/CodeIgniter4/app/Controllers/Home.php:13: object(CodeIgniter\HTTP\URI)[61] protected 'uriString' => null private ?string 'baseURL' => null protected 'segments' => array (size=1) 0 => string 'index.php' (length=9) protected 'scheme' => string 'http' (length=4) protected 'user' => null protected 'password' => null protected 'host' => string 'localhost' (length=9) protected 'port' => int 8080 protected 'path' => string '/index.php/' (length=11) protected 'fragment' => string '' (length=0) protected 'query' => array (size=0) empty protected 'defaultPorts' => array (size=4) 'http' => int 80 'https' => int 443 'ftp' => int 21 'sftp' => int 22 protected 'showPassword' => boolean false protected 'silent' => boolean false protected 'rawQueryString' => boolean false
From: #7123 (comment)
baseURL: http://localhost:8888/ci432/public/ → null segments: [] → ['ci432', 'public', 'index.php'] path: / → '/ci432/public/index.php/'
http://localhost:8888/ci432/public/
['ci432', 'public', 'index.php']
'/ci432/public/index.php/'
/Applications/MAMP/htdocs/ci432/app/Controllers/Home.php:10: object(CodeIgniter\HTTP\URI)[12] protected 'uriString' => null private ?string 'baseURL' => string 'http://localhost:8080/' (length=22) protected 'segments' => array (size=0) empty protected 'scheme' => string 'http' (length=4) protected 'user' => null protected 'password' => null protected 'host' => string 'localhost' (length=9) protected 'port' => int 8080 protected 'path' => string '/' (length=1) protected 'fragment' => string '' (length=0) protected 'query' => array (size=0) empty protected 'defaultPorts' => array (size=4) 'http' => int 80 'https' => int 443 'ftp' => int 21 'sftp' => int 22 protected 'showPassword' => boolean false protected 'silent' => boolean false protected 'rawQueryString' => boolean false /Applications/MAMP/htdocs/ci432/app/Controllers/Home.php:13: object(CodeIgniter\HTTP\URI)[51] protected 'uriString' => null private ?string 'baseURL' => null protected 'segments' => array (size=1) 0 => string 'index.php' (length=9) protected 'scheme' => string 'http' (length=4) protected 'user' => null protected 'password' => null protected 'host' => string 'localhost' (length=9) protected 'port' => int 8080 protected 'path' => string '/index.php/' (length=11) protected 'fragment' => string '' (length=0) protected 'query' => array (size=0) empty protected 'defaultPorts' => array (size=4) 'http' => int 80 'https' => int 443 'ftp' => int 21 'sftp' => int 22 protected 'showPassword' => boolean false protected 'silent' => boolean false protected 'rawQueryString' => boolean false
The text was updated successfully, but these errors were encountered:
Closed by #7282
Sorry, something went wrong.
No branches or pull requests
CodeIgniter Version: 4.3.2
1. baseURL without subfolder
From: https://forum.codeigniter.com/showthread.php?tid=86872
baseURL:
http://localhost:8080/
→null
segments:
[]
→['index.php']
path:
/
→'/index.php/'
2. baseURL with subfolder
From: #7123 (comment)
baseURL:
http://localhost:8888/ci432/public/
→null
segments:
[]
→['ci432', 'public', 'index.php']
path:
/
→'/ci432/public/index.php/'
The text was updated successfully, but these errors were encountered: