作为测试,我在 PHP 中运行一行代码来实现 PHP 客户端库。
indexTest.php
<?php
require_once realpath(dirname(__FILE__).'/google-api-php-client/autoload.php');
return;
我收到此错误:
Deprecated: google-api-php-client's autoloader was moved to src/Google/autoload.php in 1.1.3. This redirect will be removed in 1.2. Please adjust your code to use the new location. in C:\Users\NoName\Documents\academic-being-90217\google-api-php-client\autoload.php on line 25
我需要做什么来解决这个问题?
最佳答案
快速修复:
require_once realpath(dirname(__FILE__).'/google-api-php-client/src/Google/autoload.php');
Google 需要更新其 API 文档。 (最近我花了很长时间让自己陷入困境,试图使用他们的文档让它工作)。
您使用 API 的最终目标是什么?仅仅是为了登录吗?如果您需要任何帮助,我将非常乐意与您讨论任何无法正常工作的问题
关于php - google-api-php-client 的自动加载器已弃用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29438895/