0

我想用这个代码在谷歌日历上添加一个日历。

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
4

1 回答 1

0

没有这样的类CalendarGoogle_CalendarService.phphttps: //code.google.com/p/google-api-php-client/source/browse/trunk/src/contrib/Google_CalendarService.php

您可能想查看此答案

于 2013-06-08T07:30:15.663 回答