<html> <head> <title>ThaiCreate.Com Tutorial</title> </head> <body> <form name="form1" method="post" action="PageFiles2.php" enctype="multipart/form-data"> <input type="file" name="filUpload[]" id="filUpload" multiple="multiple"> <input name="btnSubmit" type="submit" value="Submit"> </form> </body> </html>
<html> <head> <title>ThaiCreate.Com Tutorial</title> </head> <body> <?php if(isset($_FILES["filUpload"])) { foreach($_FILES['filUpload']['tmp_name'] as $key => $val) { $file_name = $_FILES['filUpload']['name'][$key]; $file_size =$_FILES['filUpload']['size'][$key]; $file_tmp =$_FILES['filUpload']['tmp_name'][$key]; $file_type=$_FILES['filUpload']['type'][$key]; move_uploaded_file($file_tmp,"myfile/".$file_name); } echo "Copy/Upload Complete"; } ?> </body> </html>
ช่วยกันสนับสนุนรักษาเว็บไซต์ความรู้แห่งนี้ไว้ด้วยการสนับสนุน Source Code 2.0 ของทีมงานไทยครีเอท