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); 
관련 문제