Jump to content

problems with is_uploaded_file


maxpouliot

Recommended Posts

Here is my form code

 

<form enctype="multipart/form-data" action="<?="admin.images.save.php?show=$show"; ?>" method="post">
<input name=reldir type=hidden value="<?=$reldir ?>">
<table cellspacing=1 cellpadding=5 border=0 bgcolor=#c0c0c0 class=small>
<tr bgcolor=#f5f5f5>
<td><b>Fichier:</b></td>
<td><input name="fichier" type=file maxlength=255 length=30></td>
</tr>
<tr bgcolor=#f5f5f5>
<td colspan=2 align=right><input type=reset value="Effacer"> <input type=submit value="Envoyer"></td>
</tr>
</table>
</form>

 

And then my php code on the next page

$fichier=$_FILES['fichier'];
var_dump($_FILES[fichier]);
if(!is_uploaded_file($fichier[tmp_name])) $error.="- Nous n'avons pas reçu le fichier que vous tentiez de nous transmettre.<br>";

 

My var_dump returns me :

 

array(5) { ["name"]=> string(8) "left.jpg" ["type"]=> string(0) "" ["tmp_name"]=> string(0) "" ["error"]=> int(6) ["size"]=> int(0) }

 

How come my ["tmp_name"] is always empty? Shoudl there be some info in here?

 

Thanks for the help

Link to comment
https://forums.phpfreaks.com/topic/83048-problems-with-is_uploaded_file/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.