2011-01-25 2 views
1

私は、次のコードを持っている:「非オブジェクト上のgetCalendarListFeed()を呼び出す」というエラーの原因は何ですか?

<?php 
require_once('Zend/Loader.php'); 
$classes = array('Zend_Gdata','Zend_Gdata_Query','Zend_Gdata_ClientLogin','Zend_Gdata_Calendar'); 
foreach($classes as $class) { 
    Zend_Loader::loadClass($class); 
} 
$user = '[email protected]'; 
$pass = 'MyPassword'; 
$service = Zend_Gdata_Calendar::AUTH_SERVICE_NAME; 
$client = Zend_Gdata_ClientLogin::getHttpClient($user,$pass,$service); 
$service = $Zend_Gdata_Calendar[$client]; 

$listFeed = $service->getCalendarListFeed(); 

このコードはCall to a member function getCalendarListFeed() on a non-object in MyCal.php on line 13を返します。

このエラーの原因は何ですか?

答えて

0

私はこれが時代遅れだと知っていますが、これを撃ってください!

$service = Zend_Gdata_Calendar::AUTH_SERVICE_NAME; 
$client = Zend_Gdata_ClientLogin::getHttpClient($email, $password, $service); 
$service = new Zend_Gdata_Calendar($client); 
関連する問題