【发布时间】:2018-03-31 23:28:16
【问题描述】:
当我加载我的应用程序时,我得到了这个:
Fatal error: Uncaught exception 'Google\Cloud\Core\Exception\ServiceException' with message 'Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information' in C:\xampp\htdocs\CarLookup\vendor\google\cloud-core\RequestWrapper.php:253
我正在尝试关注这个:Google Vision Doc
我已经运行了命令:composer require google/cloud-vision
然后在客户端库上说我必须设置一个客户端库?我已经完成了所有他正确的事情然后它说-:
接下来,通过将环境变量 GOOGLE_APPLICATION_CREDENTIALS 设置为指向您在上一步中下载的 JSON 文件,为您的应用程序代码提供凭据。
然后执行这个:set GOOGLE_APPLICATION_CREDENTIALS=<path_to_service_account_file>
卡在哪里了,在哪里执行这个,如何设置环境变量?
【问题讨论】:
标签: php api google-api google-vision