qwerty234 Posted November 30, 2007 Share Posted November 30, 2007 I have pasted my code below. I want to place the user's uploaded image in /tmp/latest.img, but for some reason it is always uploading the same file even though I'm using fopen with the "wb" permission set and fclose. Does anyone have any ideas? move_uploaded_file($_FILES['imagefile']['tmp_name'],"/tmp/latest.img"); $instr = fopen("/tmp/latest.img","wb"); $image = addslashes(fread($instr,filesize("/tmp/latest.img"))); if (strlen($instr) < 20000) { $validImageSize = true; } else { $validImageSize = false; } fclose($instr); Quote Link to comment 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.