maxpouliot Posted December 24, 2007 Share Posted December 24, 2007 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( "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 Quote Link to comment https://forums.phpfreaks.com/topic/83048-problems-with-is_uploaded_file/ Share on other sites More sharing options...
PFMaBiSmAd Posted December 24, 2007 Share Posted December 24, 2007 The ['error'] element has a value of 6 - UPLOAD_ERR_NO_TMP_DIR Value: 6; Missing a temporary folder. Code must always check for all possible errors before attempting to use any data. Quote Link to comment https://forums.phpfreaks.com/topic/83048-problems-with-is_uploaded_file/#findComment-422432 Share on other sites More sharing options...
maxpouliot Posted December 24, 2007 Author Share Posted December 24, 2007 What do i have to do to not get this error? Quote Link to comment https://forums.phpfreaks.com/topic/83048-problems-with-is_uploaded_file/#findComment-422436 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.