<head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Swath Web</title> <meta name="generator" content="TextMate http://macromates.com/"> <meta name="author" content="Vee Satayamas"> </head> <body> <form method="post"> <textarea name="input_text" cols="80" rows="10"></textarea> <input type="submit" value="submit"> </form> <?php function swath($input_text) { $input_filename= tempnam("/tmp", "swath_"); $output_filename= tempnam("/tmp", "swath_"); $input_text_tis620 = iconv("UTF-8", "TIS-620", $input_text); file_put_contents($input_filename, $input_text_tis620); system("C:\AppServ\www\swath < $input_filename > $output_filename"); $raw = file_get_contents($output_filename); $raw_utf8 = iconv("TIS-620", "UTF-8", $raw); unlink($input_filename); unlink($output_filename); return preg_split('/\|/', $raw_utf8); } if($_REQUEST['input_text']) { $output = swath($_REQUEST['input_text']); print implode("<BR>", $output); file_put_contents("C:\AppServ\www\swathf\outputnews.txt",implode("|",$output)); } ?>
Quote:system("C:\AppServ\www\swath < $input_filename > $output_filename");
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง