thinkphp二维码的生成以及composer问题

今天写一个二维码生成
这个是正确的,但是重要是下面
https://www.kancloud.cn/phper123/tools/289789

我在cmd里面安装的

Using version ^1.0 for aferrandini/phpqrcode
./composer.json has been updated
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
    - phpoffice/phpspreadsheet 1.6.0 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
    - phpoffice/phpspreadsheet 1.6.0 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
    - Installation request for phpoffice/phpspreadsheet (installed at 1.6.0) -> satisfiable by phpoffice/phpspreadsheet[1.6.0].

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

Installation failed, reverting ./composer.json to its original content.

这个意思是phpini中的 extension=php_fileinfo.dll没有开启,开启重启,然后还报哪个错,说我没有开启
找了找要安装这个插件

composer require aferrandini/phpqrcode

这个,将这个添加进去
随即出现错误

  [Composer\Downloader\TransportException]
  The "https://packagist.phpcomposer.com/p/provider-2018-07%24420066adc83f62f5e996200c232bbc918588adcf5024a90bac16c19
  8b508e734.json" file could not be downloaded (HTTP/1.1 404 Not Found)


require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--update-with-all-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] []...

重试了很多次都没有成功
有说让在composer.json里面添加这个的

"packagist": {
        "type": "composer",
        "url": "https://packagist.laravel-china.org"
    },

有说让尝试镜像问题,取消镜像

composer config -g repos.packagist composer https://php.cnpkg.org
//然后把默认的 secure-http 改成false;运行代码;
composer config -g secure-http false

弄了半天弄不明白,本人对英文不够了解,看了半天,还是第一个的那个报错,偶尔翻起,看到了版本问题,是不是composer的版本,我用的php版本比较高,就去试了试

composer install --ignore-platform-reqs
或者
composer update --ignore-platform-reqs

然后就开始下载了

Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 2 installs, 0 updates, 0 removals
  - Installing phpoffice/phpexcel (1.8.2): Downloading (100%)
  - Installing aferrandini/phpqrcode (1.0.1): Downloading (100%)
Package phpoffice/phpexcel is abandoned, you should avoid using it. Use phpoffice/phpspreadsheet instead.
Package aferrandini/phpqrcode is abandoned, you should avoid using it. Use endroid/qr-code instead.
Writing lock file
Generating autoload files

默认也将我要安装的二维码插件安好了,完后

你可能感兴趣的:(phpcomposer,thinkphp)