如题所述
ä¸é¢æ¯ä¸æ®µç¤ºä¾ä»£ç ï¼
<?php// æ³¨ï¼ PHP 5.5.0èµ·ï¼æ件ä¸ä¼ 建议使ç¨CURLFile代æ¿@
// å¤æ件ä¸ä¼
$data = array(
'input_file[0]' => new CURLFile('d:/1.txt', 'text/plain', 'testfile.txt'),
'input_file[1]' => new CURLFile('d:/2.txt', 'text/plain'),
'input_file[2]' => new CURLFile('d:/3.txt', 'text/plain'),
);
$ch = curl_init('http://demo.zjmainstay.cn/php/curl/curlUploadHandler.php');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_exec($ch);
å¦æä½ ççæ¬æ¯è¾ä½ï¼æ件é¨å使ç¨ï¼
'input_file[0]' => '@d:/1.txt',è¿æ ·æ¢å¯ã
æçå客ãPHP cURLå®ç°æ¨¡æç»å½ä¸éé使ç¨æ¹æ³è¯¦è§£ã对åç±»curlé®é¢åäºç³»ç»è详ç»ç讲解ï¼è¯·åèâåã模æä¸ä¼ æ件âé¨åæ¥çæ´å¤æ件ä¸ä¼ å
容ï¼å¦ç´æ¥åºäºééçæ件å
容è¿è¡ä¸ä¼ çã
温馨提示:答案为网友推荐,仅供参考