在PHP7.1中无法上传图片的API

时间:2019-02-05 17:36:29

标签: activecollab

用于上传图片的API在PHP7.1中不起作用。在PHP 5.6中就可以了。

我的代码: $ res = $ client-> post('/ upload-files',[],[[“ file / image.png”,“ image / png”]]);

错误消息: 警告:curl_setopt():第97行的\ vendor \ activecollab \ activecollab-feather-sdk \ src \ Connector.php中不再支持禁用安全上传

PHP警告:curl_setopt():第97行的\ vendor \ activecollab \ activecollab-feather-sdk \ src \ Connector.php中不再支持禁用安全上传


此示例也无法通过以下方式工作:

Active Collab file upload using PHP SDK $ res = $ client-> post('/ upload-files',[],[[“ image / png”,“ file / image.png”]]));

错误消息:
致命错误:未被捕获的ActiveCollab \ SDK \ Exceptions \ FileNotReadable:无法在C:\ xampp \ htdocs \ helpdesk \ vendor \ activecollab \ activecollab-feather-sdk \ src \ Client.php:222中读取文件'Array' 堆栈跟踪: C:\ xampp \ htdocs \ helpdesk \ vendor \ activecollab \ activecollab-feather-sdk \ src \ Client.php(137):ActiveCollab \ SDK \ Client-> prepareAttachments(Array) C:\ xampp \ htdocs \ helpdesk \ test_upload.php(6):ActiveCollab \ SDK \ Client-> post('/ upload-files',Array,Array) {主要}   在第222行的C:\ xampp \ htdocs \ helpdesk \ vendor \ activecollab \ activecollab-feather-sdk \ src \ Client.php中抛出

能请您帮忙吗? 谢谢

0 个答案:

没有答案