Code, curl, upload multiple-file lines.
5.5 Previous versions of the notation
$file Array ( ' pic[0] ' = ' @e:\\wwwroot\\10003\\temp_56.ini;type=text/html;filename=temp_56.ini ', ' pic[1 ] ' = ' @e:\\wwwroot\\10003\\temp_29.html;type=text/html;filename=temp_29.html ' );
5.5 The wording of the above version
PHP 5.5 version or above $filearray( ' pic[0] ' = =new curlfile (' E:\\wwwroot\\10003\\temp_56.ini ', ' text/html ', ' Temp_56.ini '), ' pic[1 ', ' = =new curlfile (' e:\\ Wwwroot\\10003\\temp_29.html ', ' text/html ', ' temp_29.html ') ;
Merge other post parameters, post out
$data=Array_merge($file,$data);$ch=curl_init (); curl_setopt ($ch, Curlopt_url,$url); curl_setopt ($ch, Curlopt_post,true); curl_setopt ($ch, Curlopt_postfields,$data); curl_setopt ($ch, Curlopt_header,false); curl_setopt ($ch, Curlopt_returntransfer,true);//Curl_getinfo ($ch);$return _data= Curl_exec ($ch); Curl_close ($ch);Echo $return _data;
[Php]curl Upload Multiple files