bonjour a tous,
j ai un petit probleme d upload de fichier ...
voici mon formulaire :
et voici mon fichier qui doit faire l upload :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 echo"<table border=2>"; echo "<form method=post action=\"Execute.php\">"; echo"<td align=left width=250>Image carte :"; echo"<td align=center width=250><input type='file' name='Image' value=\"attache\" >"; echo"<tr>"; echo"<td width=250>Description image :</td>"; echo "<td width=250><textarea type=text size=15 name=Description style=\"width:250;\" style=\"height:120;\"></textarea></td></tr>"; echo "<TR>"; echo"<td width=250>Validez votre ajout</td>"; echo "<td width=250><input type=SUBMIT value=Ajouter>"; echo"</table>"; echo"</form>";
a chaque fois, il m affiche :
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 dest_dir="C:\\www\\monsite\\images\\"; $dest_dir.="$ED\\$Couleur\\"; if(move_uploaded_file($_FILES["Image"]["tmp_name"],$dest_dir.$_FILES["Image"]["name"])) { $adressebase="http:\\localhost.discogarden\\images\\$ED\\$Couleur\\"; $adressebase.=$_FILES["Image"]["name"]; $name=$_FILES["Image"]["name"]; echo("l upload du fichier s est passe sans probleme"); $dest_dir.=$name; /*$requete=odbc_exec($cnx,"INSERT INTO photo (cheminPhoto,idSitePhoto,nomPhoto,chem) VALUES ('".addslashes("$adressebase")."','$data','$name','$dest_dir')");*/ } else { echo"ERREUR lors de l upload du fichier"; }"ERREUR lors de l upload du fichier"
Partager