![]() |
# 5 |
חבר בקהילה
|
זה הקוד שאני משתמש בו:
קוד:
<?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.. |
![]() |
חברים פעילים הצופים באשכול זה: 1 (0 חברים ו- 1 אורחים) | |
|
|