这是设置的参数
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_USERPWD, user_key);
curl_easy_setopt(curl, CURLOPT_READDATA, file);
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
curl_easy_setopt(curl, CURLOPT_INFILESIZE, get_file_size(file));
curl_easy_setopt(curl, CURLOPT_FTP_CREATE_MISSING_DIRS, 1);
curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
文件不大,只有 10K 左右,网络正常,但每次curl_easy_perform 耗时都是2000+毫秒
1
BOYPT 2017-03-16 11:09:12 +08:00 1
curl_setopt($curlhandle, CURLOPT_VERBOSE, true);
设置 verbose 看看具体 log ,耗时在什么地方 |
2
wbing OP @BOYPT
``` < 229 Entering Extended Passive Mode (|||65444|) *Trying 127.0.0.1... * Connecting to 10.0.0.182 <10.0.0.182> port 65444 ``` 卡在这了,搜了下网上也有出现 Entering Extended Passive Mode 的问题 |