google-api-php-client's autoloader deprecated

江枫思渺然 提交于 2019-12-22 18:36:40

问题


As a test, I ran one line of code in PHP to implement the PHP Client Library.

indexTest.php

<?php
require_once realpath(dirname(__FILE__).'/google-api-php-client/autoload.php');
return;

I get this error:

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

What do I need to do to fix this?


回答1:


Quick Fix:

require_once realpath(dirname(__FILE__).'/google-api-php-client/src/Google/autoload.php');

Google need to update their documentation on the API. (I spent quite a while getting myself in a fuddle recently, trying to get it working using their documentation).

What is you final aim on using the API? Is it just for Login? If you need any help with it, I'll be more than happy to talk you through anything that isn't working as it should be



来源:https://stackoverflow.com/questions/29438895/google-api-php-clients-autoloader-deprecated

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!