Bonjour,
d'un coté j'ai un bout de code en phtml:
ici .$_buildListDirectory.'/'.$buildListFileName. vaut ./monrepertoire/monfichier.txt
Code : Sélectionner tout - Visualiser dans une fenêtre à part echo '<a href="download/download.php?filename='.$_buildListDirectory.'/'.$buildListFileName.'">Download here</a>';
ensuite mon fichier download.php est le suivant:
Lorsque je clishe sur mon lien "Download here", une boite de dialogue s'ouvre pour enregistrer le fichier.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3 <?php header ('Content-Type: application/download'); header ('Content-disposition: attachment; filename="' .$_GET['filename']. '"');
Sauf que tous les slash '/' ont été remplacés par des underscore '_'
Donc je fini par enregistrer le fichier ._monrepertoire_monfichier.txt
Pourtant la variable $_GET['filename'] contient bien les slash '/'
Est ce la lignequi fait la transformation???header ('Content-disposition: attachment; filename=
merci pour votre aide





Répondre avec citation





Partager