多个require_once和活动文件夹

I'm trying to implement Google APIs in PHP on WAMP, but I can't even manage to include the files.

My code is the following :

<?php
  require_once "./vendor/google/apiclient/src/Google/Client.php";

Client.php

require_once 'Google/Auth/AssertionCredentials.php';
require_once 'Google/Cache/File.php';
require_once 'Google/Cache/Memcache.php';
....

My error :

Warning: require_once(Google/Auth/AssertionCredentials.php): failed to open stream: No such file or directory in
C:\wamp\www\mysite\vendor\google\apiclient\src\Google\Client.php on line 18

How should I use include path, and similar commands to get Client.php to find what it wants ?

There are multiple ways so that the file can be found. These include the absolute path or also using setting the include path. The include path can be set via:

  • php.ini
  • .htaccess
  • ini_set function
  • set_include_path function

Please goole the one most appropriate for your use

I solved my problem using Composer.