【问题标题】:how to add extensions to vendor manually in yii2 [duplicate]如何在 yii2 中手动向供应商添加扩展 [重复]
【发布时间】:2019-04-07 08:30:01
【问题描述】:

我想在 yii2 中添加https://github.com/postaddictme/instagram-php-scraper

我从instagram-php-scraper 项目复制了vendor 到yii2 的vendor

这是我的错误:

找不到类“InstagramScraper\Instagram”

项目扩展(instagram-php-scraper)不是为 yii2 开发的。

我还应该做哪些其他更改?

【问题讨论】:

    标签: yii2 yii2-advanced-app


    【解决方案1】:

    我想你已经使用 composer 安装了 Yii2;

    使用composer添加需要的包:

    composer require raiym/instagram-php-scraper

    另见:

    https://github.com/postaddictme/instagram-php-scraper#installation

    这样,类将被添加到作曲家自动加载功能中

    【讨论】:

      【解决方案2】:

      编辑composer.json 文件并在require 中添加您的扩展名并在cmd 中保存并运行composer update

          "require": {
              .
              .
              .
              "raiym/instagram-php-scraper": "^0.8.24"
          },
      

      【讨论】:

        猜你喜欢
        • 2017-05-05
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2016-10-13
        • 2022-11-12
        • 2019-02-18
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多