<?php downloadFile($_GET["filepath"],$_GET["filename"])or die("no file found"); function downloadFile($filepath , $file){ $file_name = $file; $file_path = $filepath; $mime = 'application/force-download'; header('Pragma: public'); // required header('Expires: 0'); // no cache header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Cache-Control: private',false); header('Content-Type: '.$mime); header('Content-Disposition: attachment; filename="'.basename($file_name).'"'); header('Content-Transfer-Encoding: binary'); header('Connection: close'); if((substr($file_path,strlen($file_path)-1,strlen($file_path))=="/")) readfile($file_path . $file_name); else readfile($file_path . "/" . $file_name); exit(); } ?>
$mime = "application/vnd.openxmlformats-officedocument.wordprocessingml.document" ; $mime = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" ; $mime = "application/vnd.ms-excel"; $mime = "application/msword"; $mime = "application/pdf";
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง