找不到类别“ Google\Cloud\Storage\StorageClient” [英] Class 'Google\Cloud\Storage\StorageClient' not found

查看:214
本文介绍了找不到类别“ Google\Cloud\Storage\StorageClient”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

use Google\Cloud\Storage\StorageClient;
require __DIR__ . '\vendor\autoload.php';

$storage = new StorageClient();

这是我的代码。这里我在Windows上安装了composer并出现以下错误:-

That as my code.Here I have installed composer on windows and getting following error:-

致命错误:在 C:\xampp\htdocs\fingertips\application\controllers\中找不到类'Google\Cloud\StorageClient' 214

Fatal error: Class 'Google\Cloud\StorageClient' not found in C:\xampp\htdocs\fingertips\application\controllers\teacher.php on line 214

即使在使用composer运行命令以使用Google Cloud api之后,也没有任何反应。

And even after running commands with composer to use google cloud api's, then also nothing is happening.

在cmd上,当我运行此命令时, composer require google / cloud-storage,我得到了这个

On cmd, when I am running this, "composer require google/cloud-storage" ,I am getting this

使用版本^ 1.3的google / cloud-storage
./composer.json已更新
加载包含软件包信息的composer存储库
更新依赖项(包括require- dev)
无需安装或更新
生成自动加载文件

Using version ^1.3 for google/cloud-storage ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) Nothing to install or update Generating autoload files

我运行了很多命令来解决此问题,但没有成功。有人请帮忙解决问题

I have run so many commands to fix this but didnt get anything in success.Can somebody please help what went wrong

推荐答案

有我吗固定存储客户端?如此处所述。
https://packagist.org/packages/google/cloud-storage
使用

Have you installed storage client? as stated here. https://packagist.org/packages/google/cloud-storage use

composer require google/cloud-storage

这篇关于找不到类别“ Google\Cloud\Storage\StorageClient”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆