当我执行下面的代码时:
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。然而,我不知道为什么我会遇到这个问题和错误。有人知道为什么会这样吗?
谢谢你的帮助。
发布于 2012-10-18 00:09:07
createUser是Zend_Gdata_Gapps类的一个方法。Zend_Gdata_ClientLogin::getHttpClient返回一个Zend_Gdata_HttpClient对象。
你确定你已经读过手册了吗?
https://stackoverflow.com/questions/12927149
复制相似问题