voila mon code je n'arrive pas à uploader. Je fais tout sur une seule page insert.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
<?php
 
include "connec.inc.php";
 
if(isset($_POST['insert']))
{
 
	  $repertoire = "rep_photos/";
 
	  if (is_uploaded_file($_FILES['fichier']['tmp_name']))
	  {
		$fichier_temp = $_FILES['fichier']['tmp_name'];
		$nom_fichier = $_FILES['fichier']['name'];
 
		$fichier = $repertoire.$nom_fichier;
 
		copy($_FILES['fichier']['tmp_name'], $repertoire.$nom_fichier);
  	   }
}
 
?>
</head>
 
<body>
<form name="form1" method="post" action="">
<div align="left">
<INPUT type="hidden" name="MAX_FILE_SIZE"  VALUE="2500000">
<INPUT type="file" name="fichier" size="30" id="fichier">
(taille maxi 2Mo)
</div>
<input name="insert" type="submit" id="insert" value="Envoyer" >
</form>
</body>