上传多文件不用以数组形式传的。把收到的$_FILES用print_r显示出来就看到结构了,至于怎么用,只有自己想了,一时也不怎么好说。

解决方案 »

  1.   

    一次上传多个文件的问题:
    <?php
    //places files into same dir as form resides
    foreach ($_FILES["f1"]["error"] as $key => $error) {
       if ($error == UPLOAD_ERR_OK) {
           echo"$error_codes[$error]";
           move_uploaded_file(
             $_FILES["f1"]["tmp_name"][$key], 
             $_FILES["f1"]["name"][$key] 
           ) or die("Problems with upload");
       }
    }//文件数目
    $test = count($_FILES["f1"]["tmp_name"]);
    ?>
      

  2.   

    $test = sizeof($_FILES["f1"]["0"]["tmp_name"]);
      

  3.   

    本身POST传递过去的就是一个数组啊?