且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用PHP,curl和HTTP POST通过流文件上传文件?

更新时间:2023-02-21 20:49:05

PHP / CURL绑定支持CURLOPT_READFUNCTION选项

The PHP/CURL binding supports the CURLOPT_READFUNCTION option, which allows you to pass data to send chunk-by-chunk using that callback.

几乎完全相同的逻辑,如下面的C示例所示:
http://curl.haxx.se/libcurl/c/post-callback.html

Pretty much exactly the same logic as is shown in this C example: http://curl.haxx.se/libcurl/c/post-callback.html