<html<head><title>Download</title></head> <body> <?php $plik=\"../\".$_GET['dzial'].\"/\".$_GET['plik']; $nazwa=\"plik.pdf\"; //do celów testowych ?> </body> </html>
zmienna $_GET['dzial'] aqrat tu > pliki
zmienna $_GET['plik'] aqrat tu > dokumentacje/78xx.pdf
a plik istnieje w katalogu [root]/pliki/dokumentacje
caly link do download to > http://localhost/funkcje/download.php?dzia...ntacje/78xx.pdf
po czym dostaje błędy typu:
Kod
Warning: Cannot add header information - headers already sent by (output started at c:\apache\htdocs\funkcje\download.php:3) in c:\apache\htdocs\funkcje\download.php on line 6
Warning: Cannot add header information - headers already sent by (output started at c:\apache\htdocs\funkcje\download.php:3) in c:\apache\htdocs\funkcje\download.php on line 7
Warning: readfile("../pliki/") - Permission denied in c:\apache\htdocs\funkcje\download.php on line 8
Warning: Cannot add header information - headers already sent by (output started at c:\apache\htdocs\funkcje\download.php:3) in c:\apache\htdocs\funkcje\download.php on line 7
Warning: readfile("../pliki/") - Permission denied in c:\apache\htdocs\funkcje\download.php on line 8
co może być przyczyną błędów skryptu?
pozdro4all
Moderator: Proszę używać BBCode