我想用这个代码在谷歌日历上添加一个日历。
function addCalendar($client, $nomeInsegnamento, $codiceInsegnamento){
$calendar = new Calendar();
$calendar->setSummary($nomeInsegnamento." - ".$codiceInsegnamento);
$calendar->setTimeZone('Europe/Rome');
return $client -> calendars -> insert($calendar);
}
我已经为 PHP 导入了 Google API 库
require_once '../src/Google_Client.php';
require_once '../src/contrib/Google_CalendarService.php';
但它总是得到这个错误
Fatal error: Class 'Calendar' not found in D:\Programmi\EasyPHP-DevServer-13.1VC9\data\localweb\projects\GCE\prova.php on line 182