$queue = curl_multi_init();
foreach ($urls as $url) {
$ch = curl_init();
curl_multi_add_handle($queue , $ch);
}
curl_multi_exec($queue, $active)
***then call curl_multi_add_handle() second time***
foreach ($OtherUrls as $url) {
$ch = curl_init();
curl_multi_add_handle($queue , $ch);
}
但是发现添加的$OtherUrls 没有被获取。似乎 curl_multi_add_handle() 在 curl_multi_exec() 被调用后不能被调用。