PS C:\xampp\htdocs\dashboard-db> php spark serve
PHP Fatal error: Uncaught TypeError: Argument 1 passed to CodeIgniter\HTTP\URI::setScheme() must be of the type string, null given, called in C:\xampp\htdocs\dashboard-db\vendor\codeigniter4\framework\system\HTTP\IncomingRequest.php on line 443 and defined in C:\xampp\htdocs\dashboard-db\vendor\codeigniter4\framework\system\HTTP\URI.php:749
Stack trace:
#0 C:\xampp\htdocs\dashboard-db\vendor\codeigniter4\framework\system\HTTP\IncomingRequest.php(443): CodeIgniter\HTTP\URI->setScheme(NULL)
#1 C:\xampp\htdocs\dashboard-db\vendor\codeigniter4\framework\system\HTTP\IncomingRequest.php(207): CodeIgniter\HTTP\IncomingRequest->setPath('', Object(Config\App))
#2 C:\xampp\htdocs\dashboard-db\vendor\codeigniter4\framework\system\HTTP\IncomingRequest.php(169): CodeIgniter\HTTP\IncomingRequest->detectURI('REQUEST_URI', ' http://localho...')
#3 C:\xampp\htdocs\dashboard-db\vendor\codeigniter4\framework\system\Config\Services.php(589): CodeIgniter\HTTP\IncomingRequest->__construct(Object(Config\App), Object(CodeIgniter\HTTP\URI), '', Objec in C:\xampp\htdocs\dashboard-db\vendor\codeigniter4\framework\system\HTTP\URI.php on line 749
Fatal error: Uncaught TypeError: Argument 1 passed to CodeIgniter\HTTP\URI::setScheme() must be of the type string, null given, called in C:\xampp\htdocs\dashboard-db\vendor\codeigniter4\framework\system\HTTP\IncomingRequest.php on line 443 and defined in C:\xampp\htdocs\dashboard-db\vendor\codeigniter4\framework\system\HTTP\URI.php:749
Stack trace:
#0 C:\xampp\htdocs\dashboard-db\vendor\codeigniter4\framework\system\HTTP\IncomingRequest.php(443): CodeIgniter\HTTP\URI->setScheme(NULL)
#1 C:\xampp\htdocs\dashboard-db\vendor\codeigniter4\framework\system\HTTP\IncomingRequest.php(207): CodeIgniter\HTTP\IncomingRequest->setPath('', Object(Config\App))
#2 C:\xampp\htdocs\dashboard-db\vendor\codeigniter4\framework\system\HTTP\IncomingRequest.php(169): CodeIgniter\HTTP\IncomingRequest->detectURI('REQUEST_URI', ' http://localho...')
#3 C:\xampp\htdocs\dashboard-db\vendor\codeigniter4\framework\system\Config\Services.php(589): CodeIgniter\HTTP\IncomingRequest->__construct(Object(Config\App), Object(CodeIgniter\HTTP\URI), '', Objec in C:\xampp\htdocs\dashboard-db\vendor\codeigniter4\framework\system\HTTP\URI.php on line 749
1条答案
按热度按时间efzxgjgh1#
很抱歉我回答得太晚了。你可能已经解决了这个问题,但这个观察结果也可能对其他人有所帮助。
此问题可能是由.env文件中的app.base URL引起的。键入“localhost”或“localhost:8080”等URL将不正确,应尝试键入“http://localhost”。