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.
这篇关于作曲家不自动加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:作曲家不自动加载
基础教程推荐
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01
- 如何替换eregi() 2022-01-01
- PHP 类:全局变量作为类中的属性 2021-01-01
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
- 如何在 Laravel 中使用 React Router? 2022-01-01
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
- 在PHP中根据W3C规范Unicode 2022-01-01
