[ ] - [ ] - [ ]
:
!
-, !

. , .
:
 <a href="filename"> </a>
, , ( - ). ?

, .
:

:
<a href="download.php?file=filename"></a>

download.php :

<?php
file_download($_get['file']);
function file_download($filename) {
//
if (file_exists($filename)) {
// , .

// .

header('Location: ' . $filename);
} else {
// , HTTP
header($_SERVER["SERVER_PROTOCOL"] . ' 404 Not Found');
header('Status: 404 Not Found');
}
// ,
exit;
}
?>


: Warning: Cannot modify header information - headers already sent by (output started at Z:\home\test1.ru\www\download.php:1) in Z:\home\test1.ru\www\download.php on line 12

Warning: Cannot modify header information - headers already sent by (output started at Z:\home\test1.ru\www\download.php:1) in Z:\home\test1.ru\www\download.php on line 13


.htaccess - (((
? , !



11 , 38 (4.10.2012 - 11:52) Hello ():

3 , 45 (4.10.2012 - 11:56) ():
, , . .
, , !

7 , 13 (4.10.2012 - 12:03) m4a1fox ():

7 , 25 (4.10.2012 - 12:10) ():
, , . , . - .
?

1 , 9 (4.10.2012 - 12:12) m4a1fox ():

! . , ?!

7 , 16 (4.10.2012 - 12:19) ():
( )! , , - .

? !

12 , 24 (4.10.2012 - 12:31) killer8080 ():

, output started at Z:\home\test1.ru\www\download.php:1 <?php, , , UTF-8 with BOM.
( @ 4.10.2012 - 11:40)
, .
:

() biggrin.gif


28 , 9 (4.10.2012 - 12:59) ():
. . - . !

2 , 13 (4.10.2012 - 13:02) killer8080 ():
smile.gif
, biggrin.gif

2 , 42 (4.10.2012 - 13:04) killer8080 ():
, , ? ?

2 , 12 (4.10.2012 - 13:07) ():
, , ?))

5 , 23 (4.10.2012 - 13:12) killer8080 ():
( @ 4.10.2012 - 13:07)
,

? ! , ?

15 , 55 (4.10.2012 - 13:28) ():
, . , . , , , MS Visio (*.vsd) :

uF>s(ϴX;psYONGQm`7#|8M~^cC&c&\$>^=5.9~9s HFQGCY;HnZ@79Yq}bưs[$d~syخQ[]OS$0uNv֗֍{g4Еd ,H$:|YD{hCw;N֩\\ @qݱHWkRI5ߤC~ݷzVkv=y;uCn[/size]

2 , 46 (4.10.2012 - 13:31) killer8080 ():
( @ 4.10.2012 - 13:28)
, . , .

? ? wink.gif

7 , 50 (4.10.2012 - 13:38) ():
, , .


<?php
$file = $_GET['file'];
header ("Content-Type: application/octet-stream");
header ("Accept-Ranges: bytes");
header ("Content-Length: ".filesize($file));
header ("Content-Disposition: attachment; filename=".$file);
readfile($file);
?>


,

1 , 43 (4.10.2012 - 13:40) killer8080 ():
( @ 4.10.2012 - 13:38)
, , .

, smile.gif
? ?

3 , 5 (4.10.2012 - 13:43) ():
, . ))

49 (4.10.2012 - 13:44) killer8080 ():

? ?

1 , 27 (4.10.2012 - 13:45) ():

3 , 20 (4.10.2012 - 13:49) killer8080 ():

mod_headers . .htaccess .



55 killer8080 ():
<IfModule mod_headers.c>
Header set Content-Description "File Transfer"
Header set Content-Transfer-Encoding "binary"
Header set Content-Type "application/octet-stream"
</IfModule>

2 , 41 (4.10.2012 - 13:52) ():
! !

29 (4.10.2012 - 13:52) killer8080 ():
?
header ("Accept-Ranges: bytes");

? .
:

  |  
.
Invision Power Board © 2001-2024 Invision Power Services, Inc.