Bonjour,
J'ai un petit probleme quand je télécharge un fichier?
En fait ça marche très bien avec les fichiers pdf. C'est avec les images que ça marche pas super:
Les fichiers sont bien copiés mais après je n'arrive plus à les lire.
Un message d'erreur s'affiche:
"impossible de déterminer le type"
voici mon code:
header("Content-Disposition: attachment; filename=".$tmp) ;
header('Content-Type: application/force-download');
header('Content-Transfer-Encoding: binary');
header('Content-Length: '.filesize($tmp));
header('Pragma: no-cache');
header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
header('Expires: 0');
flush(); // Envoie le buffer
readfile($tmp); // Envoie le fichier
merci d'avance pour votre aide.
wakla