ผู้เขียน หัวข้อ: วิธีแก้ไขปัญหา Download File Office 2007,2010,2013 ไม่ได้บนภาษา PHP  (อ่าน 2857 ครั้ง)

0 สมาชิก และ 1 บุคคลทั่วไป กำลังดูหัวข้อนี้

ออฟไลน์ ผู้ดูแลระบบ

  • ยิ้มวันละนิด จิตแจ่มใส
  • Administrator
  • *****
  • กระทู้: 156
  • จิตใจสงบ ชีวิตเป็นสุข
    • ดูรายละเอียด
    • ศูนย์คอมพิวเตอร์และเครือข่ายวารินชำราบ
วิธีแก้ไขปัญหา Download File Office 2007,2010,2013 ไม่ได้บนภาษา PHP
« เมื่อ: วันที่ 23 พฤษภาคม 2013, 21:39:49 »
 :yoyo_71: :yoyo_71:

วิธีแก้ไขปัญหา Download File Office 2007,2010,2013 ไม่ได้บนภาษา PHP


บทความนี้ขอแนะนำวิธีการแก้ไขปัญหาการเขียนโปรแกรม Upload File และ Download File เอกสาร Office 2007 ซึ่งหลาย ๆ คนอาจจะเจอปัญหาเมื่อทำการเขียนโปรแกรมให้ Download File Office 2007 แล้ว ปรากฏว่าไฟล์ที่ Download ไปนั้นไม่ใช่ไฟล์ Office ดังที่ควรจะเป็น

วิธีการแก้ไข

1. สร้างไฟล์ .htaccess

2. คัดลอก Source Code ด้านล่างแล้วนำไปวางในไฟล์ แล้วบันทึกข้อมูล

3. Ftp เข้าไปไว้ในระบบ

AddType application/vnd.ms-powerpoint.template.macroEnabled.12 potm
AddType application/vnd.openxmlformats-officedocument.presentationml.template potx
AddType application/vnd.ms-powerpoint.addin.macroEnabled.12 ppam
AddType application/vnd.ms-powerpoint.slideshow.macroEnabled.12 ppsm
AddType application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx
AddType application/vnd.ms-powerpoint.presentation.macroEnabled.12 pptm
AddType application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
AddType application/vnd.ms-excel.addin.macroEnabled.12 xlam
AddType application/vnd.ms-excel.sheet.binary.macroEnabled.12 xlsb
AddType application/vnd.ms-excel.sheet.macroEnabled.12 xlsm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx
AddType application/vnd.ms-excel.template.macroEnabled.12 xltm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx

ที่มา:
http://www.amplysoft.com/knowledge/mime-type-php-office-2007-download.html

หรือไปเพิ่ม ดังรูป
« แก้ไขครั้งสุดท้าย: วันที่ 17 มิถุนายน 2017, 11:41:31 โดย ตองคิง »