0

以下のコードを実行しているとき:

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 をインストールして設定しました。ただし、この問題とエラーが発生する理由はわかりません。なぜこれが起こっているのか誰にも分かりますか?

ご協力ありがとうございました。

4

1 に答える 1

1

createUserZend_Gdata_Gapps クラスのメソッドです。Zend_Gdata_ClientLogin::getHttpClient は Zend_Gdata_HttpClient オブジェクトを返します。

マニュアルを読んだことは確かですか?

于 2012-10-17T16:09:06.613 に答える