google-api-php-client's autoloader deprecated

2019-05-24 12:09发布

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条回答
Emotional °昔
2楼-- · 2019-05-24 12:55

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

查看更多
登录 后发表回答