我正在尝试使用 Xampp 设置 Codeigniter4,但是在调用公共地址时http://localhost/projectfolder/public/index.php
如中所述README.md
CodeIgniter4框架的文件中,出现下一个错误:
<br />
<b>Fatal error</b>: Uncaught Error: Call to undefined function CodeIgniter\locale_set_default() in
C:\xampp\htdocs\codeigniter4\system\CodeIgniter.php:184
Stack trace:
#0 C:\xampp\htdocs\codeigniter4\system\bootstrap.php(181): CodeIgniter\CodeIgniter->initialize()
#1 C:\xampp\htdocs\codeigniter4\public\index.php(36): require('C:\\xampp\\htdocs...')
#2 {main}
thrown in <b>C:\xampp\htdocs\codeigniter4\system\CodeIgniter.php</b> on line <b>184</b><br />
我试过这个solution https://stackoverflow.com/questions/68154368/codeigniter-error-with-call-to-undefined-function-codeigniter-locale-set-default但这对我不起作用。
有人知道如何解决吗?
问题的根源是您缺少 PHP 扩展。
尤其:
- intl http://php.net/manual/en/intl.requirements.php
请记住,这是clearly在框架的存储库 README.md 文件中说明。
服务器要求 https://github.com/codeigniter4/CodeIgniter4#server-requirements
需要 PHP 7.4 或更高版本,并具有以下扩展
安装:
- intl http://php.net/manual/en/intl.requirements.php
-
libcurl http://php.net/manual/en/curl.requirements.php如果您打算使用 HTTP\CURLRequest 库
- mbstring http://php.net/manual/en/mbstring.installation.php
此外,请确保以下扩展已启用
你的PHP:
- json(默认启用 - 不要将其关闭)
- xml(默认启用 - 不要将其关闭)
- mysqlnd http://php.net/manual/en/mysqlnd.install.php
另外,这里还指出:
Bug:缺少函数 locale_set_default(...) #3171 https://github.com/codeigniter4/CodeIgniter4/issues/3171#issuecomment-650177614
请安装intl
扩展 - 这是必需的组件。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)