הרשם שאלות ותשובות רשימת חברים לוח שנה הודעות מהיום

חזור   הוסטס - פורום אחסון האתרים הגדול בישראל > עיצוב גראפי, תכנות על כל שפותיו וקידום ושיווק אתרים > פורום תיכנות

   
|!|

 
 
כלים לאשכול תצורת הצגה
Prev הודעה קודמת   הודעה הבאה Next
ישן 08-09-12, 14:34   # 5
GNS
חבר בקהילה
 
מיני פרופיל
תאריך הצטרפות: Jun 2012
הודעות: 276

GNS לא מחובר  

זה הקוד שאני משתמש בו:

קוד:
<?php
$filename=....
$file_url=.....

header("Pragma: public"); 
header("Expires: 0");
header("Content-disposition: attachment; filename=\"".$filename."\""); 
header("Connection: close");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); 
header("Cache-Control: private",false);
header("Content-Type: application/octet-stream");
header("Content-Description: File Transfer" );
header("Content-Transfer-Encoding: Binary");
header("Accept-Ranges: none");
header("X-Sendfile: ".$file_url);

?>

בhttpd.conf מוגדר:
XSendFileIgnoreEtag on

ותוצאות השליחה:
קוד:
Array ( [wrapper_data] => Array ( [0] => HTTP/1.1 200 OK [1] => Date: Sat, 08 Sep 2012 12:27:48 GMT [2] => Server: Apache/2.2.3 (CentOS) [3] => X-Powered-By: PHP/5.3.3 [4] => Pragma: public [5] => Expires: 0 [6] => Content-disposition: attachment; filename="[the filename]" [7] => Connection: close [8] => Cache-Control: must-revalidate, post-check=0, pre-check=0 [9] => Cache-Control: private [10] => Content-Description: File Transfer [11] => Content-Transfer-Encoding: Binary [12] => Accept-Ranges: none [13] => X-Powered-By: PleskLin [14] => Last-Modified: Wed, 04 Jul 2012 22:45:13 GMT [15] => ETag: "3c08018-4f5d5d-4c408c8b61040" [16] => Content-Length: 5201245 [17] => Content-Type: application/octet-stream ) [wrapper_type] => http [stream_type] => tcp_socket/ssl [mode] => r [unread_bytes] => 7584 [seekable] => [uri] => [the url]
כדי לבדוק שלא מדובר במטמון מהדפדפן שלי, השתמשתי בכמה דפדפנים שונים ואפילו במחשב שונה ועדיין זה מוריד קובץ אחר בכלל.

Last edited by GNS; 08-09-12 at 14:39..
  Reply With Quote
 

חברים פעילים הצופים באשכול זה: 1 (0 חברים ו- 1 אורחים)
 


חוקי פירסום
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is מופעל
סמיילים הם מופעל
[IMG] קוד מופעל
קוד HTML מכובה

קפיצה לפורום


כל הזמנים הם GMT +2. הזמן כעת הוא 05:16.

מופעל באמצעות VBulletin גרסה 3.8.6
כל הזכויות שמורות ©
כל הזכויות שמורות לסולל יבוא ורשתות (1997) בע"מ