当前位置:Gxlcms > PHP教程 > php基础练习题-多文件上传

php基础练习题-多文件上传

时间:2021-07-01 10:21:17 帮助过:7人阅读

php基础练习--多文件上传
        index_uploads    index_uploads.php

  

";            print_r($_FILES);            echo "
"; $count = count($_FILES['file']['name']); for ($i = 0; $i < $count; $i++) { $tmpfile = $_FILES['file']['tmp_name'][$i]; $filefix = array_pop(explode(".", $_FILES['file']['name'][$i])); $dstfile = "uploads/files/".time()."_".mt_rand().".".$filefix; if (move_uploaded_file($tmpfile, $dstfile)) { echo ""; } else { echo ""; } }uploads.php

  

人气教程排行