Zend framework 使用Zend Framework从文件夹中列出并打开Google文档

Zend framework 使用Zend Framework从文件夹中列出并打开Google文档,zend-framework,google-docs,google-docs-api,Zend Framework,Google Docs,Google Docs Api,我正在尝试使用Zend Framework从Google文档中名为“myfolder”的文件夹中检索文档列表 $service = Zend_Gdata_Docs::AUTH_SERVICE_NAME; $client = Zend_Gdata_ClientLogin::getHttpClient("my@gmail.com", "password", $service); $docs = new Zend_Gdata_Docs($client); $feed = $docs->getDo

我正在尝试使用Zend Framework从Google文档中名为“myfolder”的文件夹中检索文档列表

$service = Zend_Gdata_Docs::AUTH_SERVICE_NAME;
$client = Zend_Gdata_ClientLogin::getHttpClient("my@gmail.com", "password", $service);
$docs = new Zend_Gdata_Docs($client);
$feed = $docs->getDocumentListFeed('https://docs.google.com/feeds/documents/private/full/-/myfolder');
$this->view->feed = "";

foreach ($feed as $document) {
    $link = $document->getLink();
    $this->view->feed .= '<a href="'.$link[0]->getHref().'" target="_blank">'.$document->getTitle().'</a><br/>';
}
而不是

https://docs.google.com/feeds/documents/private/full/-/myfolder
我能看到我所有的文件。我可以毫无问题地打开那些保存在“Home”目录下的文件。401错误仅在我尝试打开保存在文件夹中的文件时发生


为什么??有什么想法吗?

应该使用$link[1]->getHref()而不是$link[0]->getHref()。

我在回答我自己的问题。。。我应该使用
$link[1]->getHref()
而不是
$link[0]->getHref()
,因为文件距离根目录只有一级。
https://docs.google.com/feeds/documents/private/full/-/myfolder