Bonjour ,

j'ai réaliser la page download.php

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
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
 
<?php session_start();
include ("fonction/fonction.bdd.php"); 
connexion_mysql();
 //echo "une erreur";
	if (isset($_SESSION["id_uc"]) && isset($_GET["type"]) && isset($_GET["file"])) 
	{
	 //echo "une erreur2";
	if($_GET["type"] == 'commun')
	{
	 //echo "une erreur3";
	$res=mysql_query("select CONCAT(chemin_dc, fichier_dc) as path from document_commun where id_dc='".$_GET["file"]."';") or die(mysql_error());
	//echo "select CONCAT(chemin_dc, fichier_dc) as path from document_commun where id_dc='".$_GET["file"]."';";
	}
	elseif($_GET["type"] == 'individuel')
	{
	// echo "une erreur4";
	$res=mysql_query("select CONCAT(chemin_di, fichier_di) as path from document_individuel where id_di='".$_GET["file"]."';") or die(mysql_error());
	}
	else
	{
	 echo "une erreur5";
	}
 
    if(mysql_num_rows($res)!=0){
        $row=mysql_fetch_object($res);
        header("Content-type: application/octet-stream; name=".basename($row->path)."");
		header("Content-Transfer-Encoding: Binary");
        header("Content-Length: ".filesize($row->path));
        header("Content-Disposition: attachment; filename=".basename($row->path));
        readfile($row->path);
 
    }
 
 
 
} else {
 
	 echo "une erreur";
    // header("Location: http://espace-cb.xxxx.com/...");
}
 
?>
Le téléchargement de fichier fonctionne bien sous Firefox.

Mais sous IE j'ai un problème.

Lorsque je clic sur le lien pour télécharger le fichier.

"internet explorer ne peut pas télécharger download.php de site.xxxx.com.
Internet explorer n'as pas pu ouvrir ce site internet"

Je dispose d'un gestionnaire de téléchargement (free download manager) si je clic sur le lien depuis IE, le gestionnaire télécharge le fichier.


Quelle erreur est-je commis??

guigui69