Ce que tu pourrais faire:
$path = isset( $_GET['path'] ) ? urldecode( $_GET['path'] ) : '';
if( empty( $file ) )
die( 'Erreur' );
$gile = basename( $path );
header("Content-disposition: attachment; filename=$file");
header('Content-Type: application/force-download');
header("Content-Transfer-Encoding: application/octet-stream\n");
header('Content-Length: ' . filesize($path) );
header('Pragma: no-cache');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0, public');
header('Expires: 0');
readfile( $path );
Voilà, et tu passes dans l'url (variable path ) urlencode( 'dossier/fichier_a_telecharger.txt' ):
@++
R@f
www.allpotes.ch: Photos, humour, vidéos, gags, ...
"On dit que seulement 10 personnes au monde comprenaient Einstein. Personne ne me comprends. Suis-je un génie???"