【问题标题】:Google PHP $event->getEventStatus() incorrect outputGoogle PHP $event->getEventStatus() 输出不正确
【发布时间】:2010-05-20 13:14:31
【问题描述】:

我正在尝试检查事件状态(google php calendar api),但与开发/测试服务器相比,我在本地计算机上得到了不同的结果。

$eventStatusUrl = $event->getEventStatus();

在本地返回以下内容 "http://schemas.google.com/g/2005#event.confirmed"

但在开发服务器上返回以下内容
对象 ID #154

对象 ID #153

PHP 中的 Object id #xxx 是否在两个版本之间可能有所不同? Object id #xxx 是否意味着 php 中的特定内容?是否有其他方法可以获取有人推荐我使用的状态来代替这个?

谢谢。

【问题讨论】:

    标签: php google-api google-calendar-api


    【解决方案1】:

    你知道吗,新版本的 php 自己调用 __toString(),而旧版本(在测试服务器上)需要一些轻推。

    $eventStatusUrl = $event->getEventStatus()->__toString();
    

    这就行了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-08-10
      • 1970-01-01
      • 2018-01-13
      • 2021-03-05
      • 2017-11-09
      • 2015-01-08
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多