SLT
je voudrais transférer mes photos sur mon serveur .voiçi mon code mais pour le moment y'a probleme .quelqu'un aurait il une idée
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
 
 
if(isset($_FILES['maphoto']))
{
include ('mysql_connect.php');
$ret =false; 
$img_taille =0; 
$img_type='';
$taille_max =100000;
$repository="/httpdocs/photo_rep/";
$ret = is_uploaded_file($_FILES['maphoto']['tmp_name']); 
 
if ($ret) 
/*{echo "Problème de transfert de photo"; return false;}*/
{
//Le fichier a bien été reçu 
 $img_taille =$_FILES['maphoto']['size']; 
 if ($img_taille >$taille_max) 
           { echo "Taille photo trop gros !";}
 else { 
   $img_type = $_FILES['maphoto']['type'];
   $img_nom  = $_FILES['maphoto']['name'];
   $uploadfile = $repository.$img_nom;
    move_uploaded_file($_FILES['maphoto']['tmp_name'],$uploadfile);
      }
}
}