本文介绍了作曲家不会自动加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我按照作曲家说明和成功安装作曲家。我想使用tumblr的全新。
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 Tumblr\API\Client(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.
致命错误:Class'Tumblr\API \Client'在第9行的[..] / htdocs / tumblr / myfile.php中找不到
Fatal error: Class 'Tumblr\API\Client' 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.
这篇关于作曲家不会自动加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!