|
$filesig="$sigdir\\$fileid.$workid.sig" ;
$ch2=curl_init();
$sigfile=fopen("$filesig",'r');
$sigsize=filesize("$filesig");
curl_setopt($ch2,CURLOPT_URL,"http://192.168.7.112/peter/php/petergpg/phpfile/sigup.php");
curl_setopt($ch2,CURLOPT_INFILE,$sigfile);
curl_setopt($ch2,CURLOPT_INFILESIZE,$sigsize);
curl_setopt($ch2,CURLOPT_PUT,1);
curl_setopt($ch2,CURLOPT_UPLOAD,1);
curl_setopt($ch2,CURLOPT_POST,1);
curl_exec($ch2);
curl_close($ch2);
可以
$ch1=curl_init();
curl_setopt($ch1,CURLOPT_URL,"http://192.168.7.112/peter/php/petergpg/phpfile/sigup.php");
curl_setopt($ch1,CURLOPT_POST,1);
curl_setopt($ch1,CURLOPT_POSTFIELDS,"fileid=$fileid&workid=$workid");
curl_exec($ch1);
curl_close($ch1);
也可以
但是兩個集在同一個文件中時就不可以了. |
|