Chce zrobić skrypt który będzie pobierał plik z serwera, (skrypt testuje na pliku txt). Plik się pobiera jednak jest on pusty. Pliki znajdują się w tym samym folderze co skrypt tylko umieszczone są dodatkowo w podfolderze "pliki". Gdzie i jak prawidłowo zdefiniować ścieżkę dostępu do pliku?
Mój skrypt wygląda następująco:
CODE
<?php
require_once('..\function_help\links.php');
$name_file=$_GET['name_file'];
$size_file=$_GET['size_file'];
header('Content-Type:application/force-download');
header('Content-Disposition: attachment; filename="'.basename('/pliki/'.$name_file).'";');
header('Content-Length:'.@filesize($size_file));
@readfile($name_file);
?>
require_once('..\function_help\links.php');
$name_file=$_GET['name_file'];
$size_file=$_GET['size_file'];
header('Content-Type:application/force-download');
header('Content-Disposition: attachment; filename="'.basename('/pliki/'.$name_file).'";');
header('Content-Length:'.@filesize($size_file));
@readfile($name_file);
?>
Proszę o podpowiedzi.