|
 |
|
อยากทราบว่า มีคำสั่ง php ที่ใช้สำหรับปริ้นไฟล์ text บน server ไม๊ค่ะ |
|
 |
|
|
 |
 |
|
อันนั้นมันเป็นแบบ print ทั้งหน้าเว็บ แต่อันนี้อยากได้ที่มันสามารถสั่งปริ้น ไฟล์ .txt ซึ่งวางอยู่บน server อ่ะค่ะ รบกวนอีกทีนะค่ะ
|
 |
 |
 |
 |
Date :
2009-07-21 10:22:10 |
By :
noophakdee |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Code (PHP)
<?php
$data = file_get_contents('xxx.txt');
echo nl2br($data);
echo "<script>window.print();</script>";
?>

|
 |
 |
 |
 |
Date :
2009-07-21 21:32:43 |
By :
plakrim |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอบคุณพี่ PlaKriM ครับ +1
|
 |
 |
 |
 |
Date :
2009-07-21 21:45:40 |
By :
panyapol |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอถามเพิ่มเติมนะครับ คือ จะทำไงให้ปริ้นท์โดยไม่ต้องคลิกที่ปุ่มเพื่อสั่งปริ้นท์ แบบว่าอยากให้ Auto ไปเลยครับ 
|
 |
 |
 |
 |
Date :
2009-07-21 21:52:57 |
By :
panyapol |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
บรรทัดที 4 ไง
|
 |
 |
 |
 |
Date :
2009-07-21 22:07:48 |
By :
plakrim |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ใช่ครับ แต่มันขึ้นหน้า ปริ้นท์มา แต่มันไม่ปริ้นท์เลยซะทีเดียว คือ อยากให้มัน ปริ้นท์ปื๊ดดดด ออกมาเลยอ่ะครับพี่ 

|
 |
 |
 |
 |
Date :
2009-07-21 22:20:36 |
By :
panyapol |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
เออแบบนั้นไม่รู้แฮะ อาจต้องใช้ activex หรือว่า print preview ของ ie เค้า ใครมีอะไรเด็ด เอามาบอกกันบ้างนะ
|
 |
 |
 |
 |
Date :
2009-07-21 22:53:34 |
By :
plakrim |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
อิอิ.... อยากรู้มานานแล้วครับ ใครทำได้บอกแหน่เด้อ 
|
 |
 |
 |
 |
Date :
2009-07-22 00:49:18 |
By :
panyapol |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 02
|