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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.