Gayner Posted September 26, 2009 Share Posted September 26, 2009 im trying to use getimagesize function at the same type, uploading picture.. so whenever i use ($_FILES["file"]["name"]) I can get the dimensions for the pic they uploaded. Warning: getimagesize(shop.gif) [function.getimagesize]: failed to open stream: No such file or directory in /home/gtcom/public_html/forums/ava/upload.php on line 42 Stored in: packs/cimage/shop.gif 42: list($width, $height, $type, $attr) = getimagesize($_FILES["file"]["name"]); ~~ -.- Link to comment https://forums.phpfreaks.com/topic/175584-solved-getimage-size-on-upload/ Share on other sites More sharing options...
trq Posted September 26, 2009 Share Posted September 26, 2009 $_FILES["file"]["name"] gets you the name of the file as it was on the client, uploads are stored at $_FILES['userfile']['tmp_name'] (this is the temp path and temp filename) before you move them so check there. Link to comment https://forums.phpfreaks.com/topic/175584-solved-getimage-size-on-upload/#findComment-925249 Share on other sites More sharing options...
Gayner Posted September 26, 2009 Author Share Posted September 26, 2009 $_FILES["file"]["name"] gets you the name of the file as it was on the client, uploads are stored at $_FILES['userfile']['tmp_name'] (this is the temp path and temp filename) before you move them so check there. Oh.. i found it Just had to move the stuff after, move_uploaded_file($_FILES["file"]["tmp_name"], "packs/cimage/" . $_FILES["file"]["name"]); so it reads it, thx Link to comment https://forums.phpfreaks.com/topic/175584-solved-getimage-size-on-upload/#findComment-925251 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.