Код: Выделить всё
header('Location: localhost/sig/public/');
Код: Выделить всё
public $baseURL = 'localhost/sig/public/';
Код: Выделить всё
Fatal error: Uncaught TypeError: CodeIgniter\HTTP\URI::setScheme(): Argument #1 ($str) must be of type string, null given, called in C:\xampp\htdocs\sig\vendor\codeigniter4\framework\system\HTTP\IncomingRequest.php on line 445 and defined in C:\xampp\htdocs\sig\vendor\codeigniter4\framework\system\HTTP\URI.php:749 Stack trace: #0 C:\xampp\htdocs\sig\vendor\codeigniter4\framework\system\HTTP\IncomingRequest.php(445): CodeIgniter\HTTP\URI->setScheme(NULL) #1 C:\xampp\htdocs\sig\vendor\codeigniter4\framework\system\HTTP\IncomingRequest.php(207): CodeIgniter\HTTP\IncomingRequest->setPath('/', Object(Config\App)) #2 C:\xampp\htdocs\sig\vendor\codeigniter4\framework\system\HTTP\IncomingRequest.php(169): CodeIgniter\HTTP\IncomingRequest->detectURI('REQUEST_URI', 'localhost/sig/p...') #3 C:\xampp\htdocs\sig\vendor\codeigniter4\framework\system\Config\Services.php(589): CodeIgniter\HTTP\IncomingRequest->__construct(Object(Config\App), Object(CodeIgniter\HTTP\URI), '', Object(CodeIgniter\HTTP\UserAgent)) #4 C:\xampp\htdocs\sig\vendor\codeigniter4\framework\system\Config\BaseService.php(192): CodeIgniter\Config\Services::request(Object(Config\App), false) #5 C:\xampp\htdocs\sig\vendor\codeigniter4\framework\system\Config\Services.php(580): CodeIgniter\Config\BaseService::getSharedInstance('request', NULL) #6 C:\xampp\htdocs\sig\vendor\codeigniter4\framework\system\Config\Services.php(279): CodeIgniter\Config\Services::request() #7 C:\xampp\htdocs\sig\vendor\codeigniter4\framework\system\Config\BaseService.php(192): CodeIgniter\Config\Services::exceptions(Object(Config\Exceptions), NULL, NULL, false) #8 C:\xampp\htdocs\sig\vendor\codeigniter4\framework\system\Config\Services.php(275): CodeIgniter\Config\BaseService::getSharedInstance('exceptions', NULL, NULL, NULL) #9 C:\xampp\htdocs\sig\vendor\codeigniter4\framework\system\CodeIgniter.php(175): CodeIgniter\Config\Services::exceptions() #10 C:\xampp\htdocs\sig\vendor\codeigniter4\framework\system\bootstrap.php(157): CodeIgniter\CodeIgniter->initialize() #11 C:\xampp\htdocs\sig\public\index.php(37): require('C:\\xampp\\htdocs...') #12 {main} thrown in C:\xampp\htdocs\sig\vendor\codeigniter4\framework\system\HTTP\URI.php on line 749
Код: Выделить всё
if ($baseURL !== '' || $baseURL !== null)
{
echo "alert('$baseURL');";
$this->uri->setScheme(parse_url($baseURL, PHP_URL_SCHEME));
$this->uri->setHost(parse_url($baseURL, PHP_URL_HOST));
$this->uri->setPort(parse_url($baseURL, PHP_URL_PORT));
// Ensure we have any query vars
$this->uri->setQuery($_SERVER['QUERY_STRING'] ?? '');
// Check if the baseURL scheme needs to be coerced into its secure version
if ($config->forceGlobalSecureRequests && $this->uri->getScheme() === 'http')
{
$this->uri->setScheme('https');
}
}
Подробнее здесь: https://stackoverflow.com/questions/788 ... even-thoug