|
 |
|
อยากทราบว่า popup " open/save/cancel " ตามรูปเค้าใช้อะไรเขียนครับ javascript , php หรืออื่น ๆ |
|
 |
|
|
 |
 |
|
ขอบคุณครับ สำหรับ code แต่ไม่รู้จะใส่ตรงไหนยังไง มีตัวอย่างหรือวิธีการทำไหมครับ จะขอบพระคุณเป็นอย่างยิ่ง
|
 |
 |
 |
 |
Date :
2009-11-24 10:39:49 |
By :
xi |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอบคุณครับทุกท่าน กำลังทดสอบอยู่ครับ
|
 |
 |
 |
 |
Date :
2009-11-24 17:31:43 |
By :
xi |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
อย่าลืมเปลี่ยนไอ้นี่ด้วย
header("Content-Type: application/pdf");
|
 |
 |
 |
 |
Date :
2009-11-24 18:44:51 |
By :
plakrim |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
http://www.jcatstudio.net84.net/Ishop/test.html
ทดสอบแล้วครับได้คำตอบดังนี้ http://www.jcatstudio.net84.net/Ishop/test.html อันนี้ host free ทดสอบผ่านครับแต่ไม่สามารถ Open Save ตามรูปภาพเลยครับ ไม่รู้ว่าผมทำอะไรผิดหรือเปล่าครับ ? งงไปหมดแล้ว
code ที่เขียนก็ทำตามคุณ xbeginner01


file download.php
<?
//$file = "downloads/getfile.gif";
$file =$_GET[img]; //
header("Cache-Control: public");
header("Content-Type: application/gif");
header("Content-Description: File Transfer");
header("Content-Transfer-Encoding: binary");
header("Content-Disposition: attachment; filename=" . $file);
header("Content-Length: " . filesize($file));
readfile($file);
?>
file test.html
<a href="download.php?img=img/img/p1.gif"><img src="http://www.jcatstudio.net84.net/Ishop/img/p1.gif"></a>
แต่อีกเว็บนึงไม่สามารถเปิดได้เลยครับทั้งที่เขียน code เหมือนข้างบนทุกอย่าง เว็บนี้ไม่ใช่ host free ครับ ข้อความขึ้นเวลาคลิ๊กที่รูปภาพ เปิดดูที่เว็บตามลิ้งค์ได้ครับ ไม่รู้ทำอะไรผิดเช่นกัน งงไปหมดแล้ว ทั้งที่ code เดียวกัน เปลี่ยนแค่รูปภาพเท่านั้นเอง http://www.bangkokwinefair.com/test.html

download.php
<?
//$file = "downloads/getfile.jpg";
$file =$_GET[img]; //
header("Cache-Control: public");
header("Content-Type: application/jpg");
header("Content-Description: File Transfer");
header("Content-Transfer-Encoding: binary");
header("Content-Disposition: attachment; filename=" . $file);
header("Content-Length: " . filesize($file));
readfile($file);
?>
test.html
<a href="../download.php?img=/thumbnails/biwf_logo_1.jpg"><img src="../images/logo_01.jpg" width="200" height="160" border="0"></a>
จนปัญญาแล้วครับ ทดสอบหลายรอบไม่รู้จะแก้ยังไงแล้วครับ มีความเรื่องนี้น้อยมากครับ
อาจจะเรื่องมากไปหน่อย ขอความช่วยเหลือด้วยครับ ขอบคุณครับ คุณ PlaKriM และคุณ xbeginner01
|
 |
 |
 |
 |
Date :
2009-11-25 03:28:28 |
By :
xi |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
application/jpg ไม่มีครับ imags/jpeg ลองหาคำว่า mimetype ดูนะ
|
 |
 |
 |
 |
Date :
2009-11-25 10:50:42 |
By :
plakrim |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอบคุณครับ ที่จะถามคือมันขึ้นข้อความ Warning ได้ยังไงครับ แก้ไขแล้วอันนี้ " application/jpg imags/jpeg " มันก็ยังฟ้อง Warning.......... เวลาคลิ๊กรูปอยู่ดี
ขอบคุณอีกครั้งครับ
|
 |
 |
 |
 |
Date :
2009-11-25 12:46:46 |
By :
xi |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
header("Content-Type: image/jpeg");
|
 |
 |
 |
 |
Date :
2009-11-25 12:57:48 |
By :
plakrim |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอบคุณอีกครั้งครับ คุณ PlaKriM ได้ทำตามที่แนะนำแล้ว ไม่ผ่านครับก็ยังขึ้น Warning เหมือนเดิม
<?
//$file = "downloads/getfile.jpeg";
header("Cache-Control: public");
header("Content-Type: image/jpeg"); <-ที่แก้ไข(ของเดิม ->header("Content-Type: application/jpeg");
header("Content-Description: File Transfer");
header("Content-Transfer-Encoding: binary");
header("Content-Disposition: attachment; filename=" . $file);
header("Content-Length: " . filesize($file));
readfile($file);
?> ----------> file download.php
<a href="download.php?img=/thumbnails/biwf_logo_1.jpg"><img src="images/logo_01.jpg" width="200" height="160" border="0"></a> --------------> file test.html
ปัญหาคือทำไมมันขึ้น Warning ทั้งที่ code ก็อันเดียวกัน และแก้ไขตามที่แนะนำแล้ว 2 เว็บนี้ต่างกันที่ host free กับเสียตังค์ซื้อ
http://www.bangkokwinefair.com/test.html --------> Host เสียตังค์ซื้อ
แต่ host free ไม่ขึ้น Warning คลิ๊กรูปได้ แต่ Open ไม่มีรูป Save ก็ไม่มีรูป
http://www.jcatstudio.net84.net/Ishop/test.html --------> Host ฟรี
ขอบคุณทุกๆท่านครับ สำหรับคำแนะนำและคำตอบ
ปัญหานี้ผมคงต้องหาคำตอบต่อไป ไม่อยากยอมแพ้
|
 |
 |
 |
 |
Date :
2009-11-25 16:59:19 |
By :
xi |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอบคุณครับทุกท่าน
|
 |
 |
 |
 |
Date :
2009-12-02 11:05:55 |
By :
natik |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 04
|