【发布时间】:2013-12-18 23:40:54
【问题描述】:
我正在使用 google api php 客户端。
但是,当我尝试包含以下三个库时:
require_once app_path().'/library/googleapi/contrib/Google_PlusService.php';
require_once app_path().'/library/googleapi/contrib/Google_TasksService.php';
require_once app_path().'/library/googleapi/contrib/Google_CalendarService.php';
我得到:Cannot redeclare class Google_Acl 在Google_CalendarService.php 的第 784 行。
我知道我可以修改 Google_CalendarService.php 以便仅在该类不存在时才创建该类,但这有点混乱。
我需要同时加载两个库以创建有效的 AuthURL 来授权 google plus(获取个人资料图片)和日历(获取日历)上的请求。
最好的解决方法是什么?
【问题讨论】:
标签: php class google-api google-api-php-client