<form action="upload_image_event.php" method="post" enctype="multipart/form-data" name="form1" id="form1"> <table width="404" border="1"> <tr> <td width="218"><label> <input name="upload_image[ ]" type="file" id="upload_image[ ]" /> </label></td> <td width="170"><label></label></td> </tr> <tr> <td><input name="upload_image[ ]" type="file" id="upload_image[ ]" /></td> <td> </td> </tr> <tr> <td><input name="upload_image[ ]" type="file" id="upload_image[ ]" /></td> <td> </td> </tr> <tr> <td><input name="upload_image[ ]" type="file" id="upload_image[ ]" /></td> <td> </td> </tr> <tr> <td><input name="upload_image[ ]" type="file" id="upload_image[ ]" /></td> <td> </td> </tr> <tr> <td><label> <div align="center"> <input type="submit" name="Submit" value="ตกลง" /> </div> </label></td> <td><label> <div align="center"> <input type="reset" name="Submit2" value="ยกเลิก" /> </div> </label></td> </tr> </table> </form>
<? for($i=0;$i<=count($_FILES["upload_image"]["name"]);$i++) { if($_FILES["upload_image"]["name"][$i] != "") { if(copy($_FILES["upload_image"]["tmp_name"][$i],"C:\WM\www\it.mcru.ac.th\image\image_event/".$_FILES["upload_image"]["name"][$i])) { echo "Copy/Upload Complete<br>"; } } } ?>
<?php for($i=0;$i<count($_FILES["upload_image"]["name"]);$i++) //แบบนี้มั้ง if(copy($_FILES["upload_image"]["tmp_name"][$i],"image/image_event/".$_FILES["upload_image"]["name"][$i])) //แบบนี้ด้วยมั้งCode (PHP) ?>
<html> <head> <title>ThaiCreate.Com Tutorial</title> </head> <body> <form name="form1" method="post" action="PageMultiFiles2.php" enctype="multipart/form-data"> <input type="file" name="filUpload[]"><br> <input type="file" name="filUpload[]"><br> <input type="file" name="filUpload[]"><br> <input name="btnSubmit" type="submit" value="Submit"> </form> </body> </html>
<html> <head> <title>ThaiCreate.Com Tutorial</title> </head> <body> <? for($i=0;$i<count($_FILES["filUpload"]["name"]);$i++) { if($_FILES["filUpload"]["name"][$i] != "") { if(copy($_FILES["filUpload"]["tmp_name"][$i],"myfile/".$_FILES["filUpload"]["name"][$i])) { echo "Copy/Upload Complete<br>"; } } } ?> </body> </html>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง