$cr=curl_init();
curl_setopt($cr,CURLOPT_URL,"http://localhost/curl2.php");
curl_setopt($cr,CURLOPT_POST,1);
curl_setopt($cr,CURLOPT_POSTFIELDS,"@".dirname(__FILE__)."a.txt");
curl_setopt($cr, CURLOPT_RETURNTRANSFER, 1);
$res= curl_exec($cr);
curl_close($cr);
print_r($res);curl2.php print_r($_FILES);出来结果是:
array();
为什么没有找到文件?