致命错误:PHP Google日历中找不到类

时间:2017-03-14 19:01:26

标签: php google-api

我制作的表单允许某人输入他们的姓名和日期,然后将其发送到他们的Google日历帐户。

enter image description here

API是通过作曲家安装的并且正在运行,但我不知道这个错误出现时意味着什么!

enter image description here

继承PHP 我一直在寻找有关API的信息,但我发现的东西只是让我困惑或者不属于php

if (isset($_POST['submit_button'])) {
                    $nameval = $_POST['fullname'];
                    $emailval = $_POST['email'];
                    $dateval = $_POST['date'];
                    $timeval = $_POST['time'];
                    $colorval = $_POST['color'];
                    echo '<p>This is your name: ' . $nameval;
                    echo '<p>This is your email: ' . $emailval;
                    echo '<p>This is your date: ' . $dateval;
                    echo '<p>This is your time: ' . $timeval;
                    echo '<p>This is your color: ' . $colorval;

        $event = new Google_Service_Calendar_Event(array(
  'summary' => 'Google I/O 2015',
  'location' => '800 Howard St., San Francisco, CA 94103',
  'description' => 'A chance to hear more about Google\'s developer products.',
  'start' => array(
    'date' => $dateval,
      'time' => $timeval,
    'timeZone' => 'America/Los_Angeles',
  ),
  'end' => array(
    'date' => $dateval + 1,
    'time' => $timeval  + 18000,
  ),
  'recurrence' => array(
    'RRULE:FREQ=DAILY;COUNT=1'
  ),
  'reminders' => array(
    'useDefault' => FALSE,
    'overrides' => array(
      array('method' => 'email', 'minutes' => 24 * 60),
      array('method' => 'popup', 'minutes' => 10),
    ),
  ),
));

$calendarId = 'primary';
$event = $service->events->insert($calendarId, $event);
printf('Event created: %s\n', $event->htmlLink);

                }

我确定我接近这一切都是错的,因为我是新人。

0 个答案:

没有答案