Bonjour a tous,
Voila je cherche a forcer le telechargement d'une video, c'est à dire faire apparaitre un "enregistrer sous" plutot que d'ouvrir la video dans WMP par exemple.
Pour cela j'utilise le code suivant :
$taille=filesize("$file");
header("Content-Type: application/force-download; name=\"$file\"");
header("Content-Transfer-Encoding: binary");
header("Content-Length: $taille");
header('Content-Description: File Transfer');
header("Content-Disposition: attachment; filename=\"$file\"");
header("Expires: 0");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
readfile($file);
exit;
Mais durant tout le telechargement il est impossible de continuer a naaviguer sur le site, ca repond tout simplement plus ...
Si quelqu'un a deja eu ce probleme et/ou qu'il sait comment le resoudre.
Merci.