Google API autoload.php missing

后端 未结 1 657
醉酒成梦
醉酒成梦 2020-12-21 05:47

I never used the Goodle API before, and now I try to get my feet wet accessing Google calendar via the API.

I downloaded the google-api-php-client-master.zip, extrac

相关标签:
1条回答
  • 2020-12-21 06:40

    This is the autoload.php file that you're looking for.

    It is much better (and easier) to not worry about loading each class file individually and including this autoload.php file at the top of the examples that you're going to start working with! Make sure you place the file at the folder that holds the src directory.

    You could also follow the installation documentation and set the src folder in your include path using:

    set_include_path(get_include_path() . PATH_SEPARATOR . '/path/to/google-api-php-client/src');
    

    When doing either of these things, you must instead utilize use statements to include the classes that you need.

    UPDATE: Google has moved to purely using Composer in its bleeding edge versions as per this issue. You should install Composer and run composer require "google/apiclient:~2.0@dev" to get the autoload.php file you need, or use a v1.x.x tag in the repo. I've updated the autoload.php link to the latest v1 tag.

    0 讨论(0)
提交回复
热议问题