![](/img/trans.png)
[英]How to get list of files and folders from Google Drive on my own website using PHP?
[英]How to get access to my own files using PHP SDK in Google Drive?
这是我尝试过的:
$client = new Google_Client();
$client->setAuthConfig(Mage::getBaseDir('etc') . '/test-7b390c56695f.json');
$client->setScopes(Google_Service_Drive::DRIVE);
$client->setApplicationName('artsdecors-test');
$this->service = new Google_Service_Drive($client);
foreach ($files as $file) {
echo($file->getMimeType() . "\n");
}
这仅检索了一个文件(标题为“入门”的“ application / pdf”),而不是我自己的文件。 我怎么了
客户端最有可能使用.json文件中的凭据进行身份验证。 这些是您的准确凭据还是SDK随附的一组测试凭据?
免责声明:我从未使用过驱动器sdk,只是建议这里可能存在问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.