Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Skrypt pobierania php, Skrypt pobierania php ,który wyświetli listę pobierania z katalogu
alfemix
post
Post #1





Grupa: Zarejestrowani
Postów: 10
Pomógł: 0
Dołączył: 10.02.2015

Ostrzeżenie: (0%)
-----


Witam!
Jest to pierwszy mój post na tym forum. Mam pewne pytanie do tej społeczności.
Czy ma ktoś taki skrypt, który daje listę plików z podanymi rozszerzeniami (pdf,jpg,bmp itp) i gdy naciśniemy na nazwę pliku na tej liście pobiera nam się ten plik. Prosiłbym o jakieś linki, skrypty, ja nic nie napiszę bo dopiero zaczynam. Pardzo proszę o pomoc, gdyż taki skrypt jest mi bardzo potrzebny.
Mam oto taki skrypt



CODE
<?php
header("Content-type: application/octet-stream");

header("Content-Length: " . filesize('nazwa.pdf'));

header('Content-Disposition: attachment; filename="nazwa.pdf"');

readfile('nazwa.pdf');
?>


ale to muszę robić ręcznie, a chodzi mi o to żeby tylko do danego folderu dać pliki do pobrania i wyświetlić listę, a użytkownik z tej listy wybiera coś naciska i m u się pobiera automatycznie.
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
alfemix
post
Post #2





Grupa: Zarejestrowani
Postów: 10
Pomógł: 0
Dołączył: 10.02.2015

Ostrzeżenie: (0%)
-----


Dziękuję za szybką reakcję (IMG:style_emoticons/default/smile.gif)
wgrałem na serwer i niestety:

CODE

Warning: opendir(Kopie_zapasowe) [function.opendir]: failed to open dir: No such file or directory in /home/blastcra/public_html/test/index.php on line 3

Warning: readdir(): supplied argument is not a valid Directory resource in /home/blastcra/public_html/test/index.php on line 10

Warning: asort() expects parameter 1 to be array, null given in /home/blastcra/public_html/test/index.php on line 17

Warning: Invalid argument supplied for foreach() in /home/blastcra/public_html/test/index.php on line 18

Warning: Invalid argument supplied for foreach() in /home/blastcra/public_html/test/index.php on line 23
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 11.10.2025 - 21:59