Bonjour, JE SOUHAITE TÉLÉCHARGER DES FICHIERS TEXTES, DES FCIHEIRS ZIPPÉ ETC....
POUR CELA, J'UTILISER JSUQU'A PRESENT CES LIGNES DE CODE :
EXEMPLE :bio.php
<?php
header("content-type:application/force-download");
header("Content-Disposition: attachment;filename=Biography_AMA.doc");
readfile("http://www.alezinwonderland.com/download/Biography_AMA.doc");
?>
AVEC SUR MA PAGE HTML , UN lien :
<a href="bio.php">Click here (.doc, 28Ko) </a><br/>
mais depuis quelques temps, ca ne fonctionne plus, en effet a chaque fois que je clique sur le lien
ca charge la page php et ca ne telecharge plus le fichier cible (Biography_AMA.doc)
j'ai essaye sur differents navigateurs : safari, firefox, camino, internet explorer...
merci de me venir en aide
ps : j'ai aussi teste ce code :
<?php
// information concernant le fichier à télécharger
$fichier = 'download/kit_AMA.zip';
$nom_fichier = 'kit_AMA.zip';
// téléchargement du fichier
header('Content-disposition: attachment; filename='.$nom_fichier);
header('Content-Type: application/force-download');
header('Content-Transfer-Encoding: fichier');
header('Content-Length: '.filesize($fichier));
header('Pragma: no-cache');
header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
header('Expires: 0');
readfile($fichier);
?>
il m'arrive les memes pbs
merci