随手整理个代码上来,利用自带的curl扩展上传文件的实例:

<?php
$file     = curl_file_create('d:\1.txt');#文件绝对路径
$postData = array('extra_info' => '123456','file_content[......]

Read more