gpt4 book ai didi

php - 使用Composer安装时出现CodeIgniter 4问题

转载 作者:行者123 更新时间:2023-12-03 11:23:13 25 4
gpt4 key购买 nike

我在尝试通过Composer在本地服务器(xampp)上安装CodeIgniter 4时遇到问题

引发我的代码如下:

    PS C:\Users\PuercoRico> cd D:\xampp\htdocs
PS D:\xampp\htdocs> composer create-project codeigniter4/appstarter ci4 -s rc
Installing codeigniter4/appstarter (4.0.0-rc.4)
- Installing codeigniter4/appstarter (4.0.0-rc.4): Loading from cache
Created project in ci4
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- codeigniter4/framework v4.0.0-rc.3 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- codeigniter4/framework v4.0.0-rc.2.1 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- codeigniter4/framework v4.0.0-rc.2 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- codeigniter4/framework v4.0.0-rc.1 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- codeigniter4/framework 4.0.0-rc.4 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- Installation request for codeigniter4/framework ^4@rc -> satisfiable by codeigniter4/framework[4.0.0-rc.4, v4.0.0-rc.1, v4.0.0-rc.2, v4.0.0-rc.2.1, v4.0.0-rc.3].

To enable extensions, verify that they are enabled in your .ini files:
- D:\xampp\php\php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

我正在使用的php版本是7.4.1

知道错误可能是什么或如何解决。

最佳答案

您的PHP缺少 intl 扩展名。它对于格式化货币,数字和日期/时间以及符合UCA的归类,消息格式化和文本规范化等很有用。
checkout Codeignitor 4 [文档] [1]:
请按照以下步骤将其安装在XAMPP中-

  • 打开[xampp_folder_path]/php/php.ini进行编辑。
  • 搜索; extension = intl 并删除
  • 保存php.ini文件并重新启动Apache。
  • 关于php - 使用Composer安装时出现CodeIgniter 4问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60250533/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com