Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/excel/28.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
php curl的file transfert in-F选项_Php_Curl - Fatal编程技术网

php curl的file transfert in-F选项

php curl的file transfert in-F选项,php,curl,Php,Curl,我必须“翻译”这个请求: curl -X POST -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -F "recipients[0][name]=John" -F "recipients[0][email]=john.doe@gmail.com" -F "files[0]=@/path/to/the/pdf/document.pdf" https://api.sandbox.signaturit.com/

我必须“翻译”这个请求:

curl    
-X POST    
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"    
-F "recipients[0][name]=John"    
-F "recipients[0][email]=john.doe@gmail.com"    
-F "files[0]=@/path/to/the/pdf/document.pdf"    
https://api.sandbox.signaturit.com/v3/signatures.json

转换为PHP curl请求。问题是这个文件,我在php curl请求中找不到如何做到这一点。您能帮我吗?

堆栈溢出不是一种代码编写服务,希望您自己尝试编写代码。我建议您对您的问题进行一些研究(可能尝试页面顶部的搜索框),并尝试自己编写一些代码。如果/当您在代码中遇到任何问题,请再次询问并解释您尝试了什么,以及为什么它不适合您。我知道,但我尝试了许多不同的方法,但都没有成功。顺便说一句,我从这个API找到了一个客户端的替代方案。