dqtl46964 2015-04-03 20:00
浏览 107
已采纳

google-api-php-client的自动加载器已弃用

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条回答 默认 最新

  • dongzhong7443 2015-04-03 20:25
    关注

    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

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog
  • ¥15 Excel发现不可读取的内容