php - Script won't move file -
hello upload multiple files php script. recognises files, doesn't move them right folder , isn't giving errors.
this php code
if(isset($_post['uploadimage'])){ for($i=0;$i<count($_files['upload']['size']);$i++){ if(strstr($_files['upload']['type'][$i], 'image')!==false){ $name = $_files['upload']['name'][$i]; move_uploaded_file($name, "../_/upload"); echo $name; } } }
this html
<form name="formadd" method="post" action="../control/checkcall.php" enctype="multipart/form-data"> <input type="file" value="" name="upload[]" multiple> <button type="submit" name="uploadimage">upload!</button> </form>
change following line
move_uploaded_file($_files['upload']['tmp_name'][$i],"../../upload/".$name);
Comments
Post a Comment