composer does not autoload(作曲家不自动加载)
问题描述
我按照作曲家的说明成功安装了作曲家.我想使用 tumblr 全新的 php api 客户端.
I followed the composer instructions and installed composer successfully. I want to use tumblr's brand new php api client.
我的文件夹结构:
vendor/
composer.json
composer.lock
myfile.php
composer.json
:
{
"require": {
"tumblr/tumblr": "0.0.2"
}
}
myfile.php
:
require 'vendor/autoload.php';
$client = new TumblrAPIClient(CONSUMER_KEY, CONSUMER_SECRET);
使用 php composer.phar install
安装也很有效.但是在执行 myfile.php
时找不到该类.
Installing using php composer.phar install
works great as well. But when executing myfile.php
the class could not be found.
致命错误:在第 9 行的 [..]/htdocs/tumblr/myfile.php 中找不到类TumblrAPIClient"
Fatal error: Class 'TumblrAPIClient' not found in [..]/htdocs/tumblr/myfile.php on line 9
推荐答案
已经发布了一个新版本的 tumblr.php 来解决这个问题.感谢@igorw.
A new version of tumblr.php has been released which fixes the issue. Thanks to @igorw.
这篇关于作曲家不自动加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:作曲家不自动加载


- 正确分离 PHP 中的逻辑/样式 2021-01-01
- Oracle 即时客户端 DYLD_LIBRARY_PATH 错误 2022-01-01
- Laravel 仓库 2022-01-01
- 如何定位 php.ini 文件 (xampp) 2022-01-01
- 带有通配符的 Laravel 验证器 2021-01-01
- 从 PHP 中的输入表单获取日期 2022-01-01
- 没有作曲家的 PSR4 自动加载 2022-01-01
- Mod使用GET变量将子域重写为PHP 2021-01-01
- PHP Count 布尔数组中真值的数量 2021-01-01
- SoapClient 设置自定义 HTTP Header 2021-01-01