Bonjour a tous!
Je vous explique mon soucis...
Afin de permettre aux gens de télécharger des fichiers, j'ai établi un script php dans lequel j'initialise des headers et j'utilise un readfile (avec un force-download)
Or mon problème, quand je télécharge le fichier deux fois d'affiler, ou un autre qui fonctionne de la même façon, j'ai accès au téléchargement de mon script php... imaginez le problème!
header("Content-disposition: attachment; filename=$document");header("Content-Type: application/force-download");
header("Content-Transfer-Encoding: $type\n");
header("Content-Length: ".filesize(RACINE."documents/".$document));
header("Pragma: no-cache");
header("Cache-Control: no-cache, must-revalidate");
header("Expires: 0");
readfile(RACINE."documents/".$document);
J'ai vérifié, mon nom de document est toujours correcte.
Partager