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); Link to comment https://forums.phpfreaks.com/topic/79581-uploading-same-image-from-tmp-directory/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.