时间:2021-07-01 10:21:17 帮助过:8人阅读
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
以上就介绍了php基础练习--多文件上传,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。