PHP Requests Library within Codeigniter

前端 未结 5 2477
孤独总比滥情好
孤独总比滥情好 2021-02-20 06:52

I\'m using the requests library (http://requests.ryanmccue.info/) for PHP.

I installed composer and added the following Json configuration in composer.json

5条回答
  •  被撕碎了的回忆
    2021-02-20 07:23

    You shouldn't need to add the autoload block to the composer.json, including the library in the require block will use the autoload configuration provided by the package.

    You generally use an autoload block to configure loading of code that is not installed via a composer package.

    You also need to require the composer autoload file, if you haven't already by

    require 'vendor/autoload.php';
    

    somewhere that will be run before the code that needs the composer libraries (generally it's in the "bootstrap" process)

    And, you need to run composer install to actually install the configured dependencies.

提交回复
热议问题