当我执行以下代码时:
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。但是,我不知道为什么我会遇到这个问题和错误。有谁知道为什么会这样?
感谢您的帮助。
答案 0 :(得分:1)
createUser
是Zend_Gdata_Gapps类的一种方法。 Zend_Gdata_ClientLogin :: getHttpClient返回Zend_Gdata_HttpClient对象。
您确定已阅读本手册吗?