当我执行下面的代码时:
require_once 'Zend/Loader.php';
Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
Zend_Loader::loadClass('Zend_Gdata_Gapps');
$client = Zend_Gdata_ClientLogin::getHttpClient("amdminuser", "adminpsw", Zend_Gdata_Gapps::AUTH_SERVICE_NAME);
$client->createUser($username, $givenName, $familyName, $password, $passwordHashFunction=null, $quota=null)
它给出了错误:
Fatal error: Call to undefined method Zend_Gdata_HttpClient::createUser() in ....
然后我们运行安装检查器,但它向我们显示了这个错误:
Fatal error: Uncaught exception 'Zend_Gdata_App_Exception' with message 'DOMDocument cannot parse XML: DOMDocument::loadXML(): Extra content at the end of the document in Entity, line: 1' in /web/web2/apache2/htdocs/test/per_ak/google/library/Zend/Gdata/App.php:830 Stack trace: #0 /web/web2/apache2/htdocs/test/per_ak/google/library/Zend/Gdata/App.php(789): Zend_Gdata_App::importString('importUrl('https://gdata.y...', 'Zend_Gdata_YouT...', NULL) #2 /web/web2/apache2/htdocs/test/per_ak/google/library/Zend/Gdata.php(162):
我已经下载了http://packages.zendframework.com/releases/ZendGdata-1.12.0/ZendGdata-1.12.0.zip,在 php.ini 中安装并设置了适当的 include_path。但是,我不知道为什么会遇到这个问题和错误。有谁知道为什么会这样?
感谢您的帮助。