<?php if (($picture!=none) && (ereg("^image",$picture_type) || ereg("application/x-shockwave-flash",$picture_type))) { // check image type $picture_path="./picture_comment"; // path file to be saved # print "Local File : $picture <br>\n"; // file image detail print "File name : $picture_name <br>\n"; // file image detail printf ("Size : %d",($picture_size/1024)); // file image detail print " KB. <br>\n"; print "Type : $picture_type <br>\n"; // file image detail if ($picture_type=="image/gif") { // check image type $imgtype="gif"; } elseif (($picture_type=="image/pjpeg") || ($picture_type=="image/jpeg")) { // IE & Firefox $imgtype="jpg"; } elseif ($picture_type=="image/png") { $imgtype="png"; } elseif ($picture_type=="application/x-shockwave-flash") { $imgtype="swf"; } elseif ($picture_type=="image/bmp") { $imgtype="bmp"; } else { $imgtype=""; } $picture_name_new=time().".$imgtype"; // set image name if (copy($picture,"$picture_path/$picture_name_new")) { // coppy image # print "ÀÒ¾»ÃСͺ : $picture_name_new <br>\n"; // ok } else { print "äÁèÊÒÁÒöãÊèÀÒ¾»ÃСͺä´é <br>\n"; // no ok } # Unlink picture from Temp unlink ($picture); $picture="$picture_name_new"; } else { if ($picture_name=="") { print "äÁèÁÕÀÒ¾»ÃСͺ <br>\n"; } elseif (!ereg("^image",$picture_type) || !ereg("application/x-shockwave-flash",$picture_type)) { print "äÁèãªè image file ËÃ×Í flash file<br>\n"; } else { print "ÀÒ¾»ÃСͺ¢¹Ò´à¡Ô¹ 150 Kb <br>\n"; } $picture=""; } # End Upload picture ?> ก้อบรูปที่เลือก ลงโฟลเดอร์ ?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง