这是我的代码
<?php
require_once '/home/bachus03/domains/bachus03.vot.pl/public_html/fb/vendor/autoload.php';
putenv('GOOGLE_APPLICATION_CREDENTIALS=/home/bachus03/domains/bachus03.vot.pl/public_html/fb/public/service-account.json');
$client = new Google_Client();
$client->setScopes(['https://www.googleapis.com/auth/drive.metadata']);
$client->useApplicationDefaultCredentials();
$files = new Google_Service_Drive_DriveFile($client);
$response = $files->getOwners();
echo json_encode($response) . "\n";
?>
在我运行test.php脚本后,我得到了:
[bachus03@s14:: ~ ]:$ /usr/local/php/p56/bin/php /home/bachus03/domains/bachus03.vot.pl/public_html/fb/public/test.php
NUll
我做错了什么?