Lorsque je dl le fichier word et que je tente de le lire, MSword m'envoi péter...
Voila mon code :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php
$tableau = explode (".", $file);
$nb_element_1 = count ($tableau) -1;
if ($tableau[$nb_element_1] != "php") {		
        header("Content-disposition: attachment; filename=$file");		
        header("Content-Type: application/force-download");
        header("Content-Transfer-Encoding: binary"); 
        header("Content-Length: ".filesize("../ficheInscription/".$file));
        header("Pragma: no-cache");
        header("Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0");
        header("Expires: 0");		 
        readfile("../ficheInscription/".$file);
}
else {
        header("Location: index.php");
}
?>

Manque t-il quelque chose ??? Je ne vois plus ce qu'il faut essayer ...;