【发布时间】:2019-09-27 21:27:13
【问题描述】:
- 我正在尝试将“cedarmaps-php-sdk”composer 包添加到我的 Laravel 项目中
包可以在这里找到:https://github.com/cedarstudios/cedarmaps-php-sdk
-
我已经成功安装了这个包
作曲家安装 & 作曲家更新
问题是当我想使用“CedarMaps”时出现错误:
"main(): Failed opening required 'vendor/autoload.php' (include_path='C:\xampp\php\PEAR')"*image目前,我已经通过更改手动绕过了这个问题
require('vendor/autoload.php');
到
require('../vendor/autoload.php');
在下面的文件(存储库文件)中
供应商/cedarmaps/cedarmaps-php-sdk/src/CedarMaps.php
我做错了吗?
++++++++++++++++++++++++++++++++++++
让我问一个问题:这个包本身是否需要 autoload.php ,我的意思是作曲家不会自动处理所有包的自动加载吗?
【问题讨论】:
-
你在哪里使用
CedarMaps?可以分享一下吗? -
use CedarMaps\CedarMaps;然后new CedarMaps($access_token);这似乎工作正常,因为错误是从包的文件本身内部抛出的\vendor\cedarmaps\cedarmaps-php-sdk\src\CedarMaps.php
标签: php laravel composer-php