<input type="file" name="uploadfiles[]">

解决方案 »

  1.   

    不好意思,是我没说清楚.
    是通过HTTP接口,将多个文件从一台服务器POST到另一台服务器
      

  2.   

    是对方提供HTTP接口,我以POST的方式上传log文件
      

  3.   

    那个文件下载过去不行了
    如果你要用post过去要发送头信息
    Content-Type application/x-www-form-urlencdoed
      

  4.   

    <form action="对方的接口文件.php" method="post" enctype="multipart/form-data" name="form1" target="_blank" id="form1">
      <input name="upfile[]" type="file" id="upfile[]" />
      <input name="upfile[]" type="file" id="upfile[]" />
      <button type="submit">表单提交</button>
    </form>这样吧?
      

  5.   

    我想你的意思是不是用php程序在后台模拟http请求post文件到指定server?
    可以用socket相关函数实现
    只是在构造http请求包时,需要注意一些地方
    比如Content-Type: multipart/form-data; boundary=.....,
    以及具体的content,如:
    Content-Disposition: form-data; name="..."; filename="..."
    Content-Type: text/plain
    具体的可以看看http协议中上传文件的说明