Bonjour,
Dans les tutos trouvés sur le Web on mélange souvent ces 2 verbes et j'aimerais votre éclairage ... définitif.

Pour moi :
- Downloader signifie 'descendre' dans un PC client (local), un fichier qui est stocké sur un SERVEUR Web (distant)
- Uploader signifie 'monter/déposer/mettre' sur un SERVEUR (distant), un fichier détenu sur un PC local.
Cette distinction est-elle la bonne et la seule 'vraie' ?

Mon souci de ce jour est la difficulté de 'descendre' sur un PC Client (local), un fichier hébergé sur un SERVEUR (distant).
Le 'download' (Voir/Télécharger) fonctionne très bien QUE lorsque le nom du dossier où réside ce fichier, et le nom du fichier lui-même ne comportent aucun espace !

Voici une partie de 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
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
	//XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
	echo "<h1> Menu de GESTION des PARTITIONS :</h1> ";  		//XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
	//XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
	if($cur_dir <> "" ) {echo " <h2> Répertoire en cours : &nbsp ".$cur_dir; echo "</h2> ";}
	echo "<br>"; 
	if(@$_SESSION['admin_partition'] == "11205") {
		echo "Vous avez le statut d'Administrateur (11205)";
	}else{
		echo "Vous avez le statut d'Utilisateur"; 
	}
 
	echo "<br>"; echo "<br>"; 
 
	$results = scandir($Absolu_cur_dir);							
	echo "<table style='table-layout:auto;width:80%' border: dotted='1'> ";
 
	if($cur_dir == "" ) {
		echo "<tr>    <th> <center> Dossiers Disponibles </th>    <th> <center> Actions possibles </th>    </tr> ";
	}else{
		echo "<tr>    <th> <center> Partitions du Répertoire en cours </th>    <th> <center> Actions possibles </th>    </tr> ";
	}
 
	foreach($results as $fichier) {								
 
		if($fichier != '.' and $fichier != '..'){  				// A revoir...
			$fichier_relatif_encode = urlencode($cur_dir."/".$fichier);
			$fichier_complet_encode = urlencode($Absolu_cur_dir."/".$fichier);
 
 
			echo '<div align="left" >';
				echo " <ul> ";
				echo " <h2> En 147, Valeurs des variables : </h2> "; 
				echo " fichier.................................:  &nbsp  &nbsp ".$fichier; echo "<br>";
				echo " cur_dir ..............................:  &nbsp  &nbsp ".$cur_dir; echo "<br>"; 
				echo " root_dir .............................:  &nbsp  &nbsp ".$root_dir; echo "<br>"; 
				echo " absolu_cur_dir ...................:  &nbsp  &nbsp ".@$absolu_cur_dir; echo "<br>"; 
				echo " <br>"; 
				echo " fichier_relatif_encode ..........:  &nbsp  &nbsp ".$fichier_relatif_encode; echo "<br>"; 
				echo " fichier_complet_encode........:  &nbsp  &nbsp ".$fichier_complet_encode; echo "<br>";  
				echo "<br>"; 
				echo "<br>";  
			echo "</div>";
 
 
			//  Fonctionne si aucun espace
			//$enfin = $root_dir.$cur_dir."/".$fichier; echo "enfin : ".$enfin; echo "<br>"; echo "<br>"; //exit;
 
			$enfin = $root_dir.$cur_dir."/".$fichier;
			echo "enfin : ".$enfin; echo "<br>"; echo "<br>"; //exit;
 
			echo "<tr><td> &nbsp ".$fichier. "</td>";    		
			echo " <td><center> ";
 
			// DESCENDRE si répertoire
			if (is_dir($Absolu_cur_dir."/".$fichier)) {			//  C'est un Répertoire
				echo "<input type=button class='btn' style='font-size:100%; color:black;' onclick=window.location.href='Ges_Partitions.php?cur_dir=$fichier_relatif_encode'; value='Accéder à ce Dossier'/> ";	echo " &nbsp ";
			}
 
			// ACTIONS possibles car c'est un FICHIER
			if (is_file($Absolu_cur_dir."/".$fichier)) {
 
				//  Bouton pour 'Visu/Télécharger' : Tout marche bien si pas d'espaces dans les noms des dossiers, ni dans ceux des fichiers
				echo " <input type=button class='btn' style='font-size:100%; height:50px; color:bleu;' onclick=window.location.href='$enfin'; value='VoirTélécharger' /> </h2>";
 
				//  Bouton en fin de ligne pour 'Supprimer' cette partition	
				if(@$_SESSION['admin_partition'] == "11205" ) {			//  C'est donc un Administrateur
					echo "<input type=button class='btn' style='font-size:100%; color:black;' onclick=window.location.href='Ges_Partitions.php?suppr_fichier=$fichier_complet_encode'; value='Supprimer'/> ";	echo " &nbsp ";				
				}
 
 
			}else{
				// echo $fichier." n'est pas un fichier "; echo "<br>";// exit;
			}
 
			echo "</td> "; echo "</tr> ";		
		}			
 
	}
	echo "</table>";
	echo "<br>"; echo "<br>"; 
 
 
	$_SESSION['fichier_complet_encode'] = @$fichier_complet_encode;
	$_SESSION['fichier_relatif_encode'] = @$fichier_relatif_encode;
	$_SESSION['cur_dir']  = $cur_dir;
	$_SESSION['root_dir'] = $root_dir;
	$fichier_complet_encode = "";
 
 
	if(@$_SESSION['admin_partition'] == "11205" AND $cur_dir <> "" ) {			//  C'est donc le Responsable du Groupe des partitions, donc Administrateur
		echo " <input type=button class='btn' style='font-size:100%; color:black;' onclick=window.location.href='Ges_Partitions.php?ajout_fichier=$fichier_complet_encode'; value='AJOUTER une PARTITION dans ce DOSSIER'/> ";	echo " &nbsp ";
	}
 
 
	echo "<br>"; echo "<br>"; echo "<br>"; 
 
	if($cur_dir <> "" ) {
		echo " <input class='btn' type=button style='font-size:130%; color:black;' onclick=window.location.href='Ges_Partitions.php'; value='219 Retour au Choix des DOSSIERS' />"; 
	}
Pouvez-vous m'aider ? ... au moins à comprendre ...
Merci
Cordialement
Maub