【问题标题】:Is there a limit of Events I can enter with the google calendar data api?我可以使用谷歌日历数据 API 输入的事件是否有限制?
【发布时间】:2010-02-04 23:08:42
【问题描述】:

我正在运行一个 php 脚本来插入我从 CSV 文件中获取的事件。事件在我的日历中成功输入,但在输入大约 75 个事件后停止。知道它是否仅限于一定数量的事件,或者它是我的代码中的问题。

提前感谢您帮助我!

  $event->title = $service->newTitle($title);

  $event->where = array($service->newWhere("Red Ball Internet Centre"));


  $service->newContent($content);



  // Set the date using RFC 3339 format.

  $tzOffset = "-04";



  $when = $service->newWhen();

  $when->startTime = "{$startDate}T{$startTime}:00.000{$tzOffset}:00";

  $when->endTime = "{$endDate}T{$endTime}:00.000{$tzOffset}:00";

  $event->when = array($when);

  // Upload the event to the calendar server

  // A copy of the event as it is recorded on the server is returned
  switch($rink)
  {
    case"Rink A":
        $uri = "http://www.google.com/calendar/feeds/qsqivvbvdm7o4ibrmt9gfu301g%40group.calendar.google.com/private/full"; 
    break;
    case"Rink B":
        $uri = "http://www.google.com/calendar/feeds/dcr864c3orqj264mufl1t3slt8%40group.calendar.google.com/private/full"; 
    break;
    case"Rink C":
        $uri = "http://www.google.com/calendar/feeds/bira8i123uuqovhn5kuk9caqnk%40group.calendar.google.com/private/full"; 
    break;
    case"Rink D":
        $uri = "http://www.google.com/calendar/feeds/11a8m100ccjhms971kc33app4g%40group.calendar.google.com/private/full"; 
    break;                  
  }

  $newEvent = $service->insertEvent($event, $uri);

【问题讨论】:

    标签: php zend-framework calendar gdata-api


    【解决方案1】:

    此脚本在停止之前大约运行了多长时间?可能是您需要增加 php.ini 文件中的 MAX_EXECUTION_TIME 设置吗? PHP 有可能在有机会完成之前就超时了。

    【讨论】:

    • 哦……没想到。让我试试这个!
    猜你喜欢
    • 1970-01-01
    • 2015-12-12
    • 2012-10-10
    • 1970-01-01
    • 2018-09-13
    • 1970-01-01
    • 2021-10-25
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多