【发布时间】:2016-04-21 13:39:29
【问题描述】:
我正在为 Active Collab 中的创建任务创建 API,并且我已成功获取 get 和 set 的新任务名称、消息和截止日期。
但是,当我插入图像或文件时,它并没有创建任务。
下面是我的代码,请帮我解决它。
try {
API::call('projects/60/tasks/add', null, array(
'task[name]' => $_POST['name'],
'task[body]' => $_POST['message'],
'task[priority]' => $priority,
'task[due_on]' => $date,
'task[assignee_id]' => 21,
), array(
'a.png' /* This array is for attach image to this task but not working in my case and I found this from https://help-classic.activecollab.com/books/api/sdk.html */
));
echo 'Ticket Created Successfully.';
} catch(AppException $e) {
print $e->getMessage() . '<br><br>';
var_dump($e->getServerResponse());
}
【问题讨论】:
-
有没有回信?? $e->getMessage()
标签: php api activecollab