i think its the paths... the php temp dir is /tmpCode:if ($_FILES['screenshot']['error'] > 0) { echo 'Error: ' . $_FILES['screenshot']['error'] . '<br />'; }else { $u_img = $temp.$usr.'.png'; echo 'New Filename: ' . $u_img . '<br />'; $img = $temp.basename($_FILES['screenshot']['name']); echo 'Uploaded: ' . $img . '<br />'; echo "Type: " . $_FILES["screenshot"]["type"] . "<br />"; echo "Size: " . ($_FILES["screenshot"]["size"] / 1024) . " Kb<br />"; echo "Stored in: " . $_FILES["screenshot"]["tmp_name"] . " <br />"; if( move_uploaded_file($phpbb_root_path.$_FILES['screenshot']['tmp_name'],$img )) { echo 'The file '. $u_img . ' has been uploaded<br />'; }else{ echo "There was an error uploading the file, please try again!"; } }
here is the output of the code:
New Filename: generator/temp/Static.png
Uploaded: generator/temp/Wallpaper.png
Type: image/png
Size: 45.6708984375 Kb
Stored in: /tmp/phpv4PjL3
There was an error uploading the file, please try again!
the generator folder + all sub dirs are set to 777 so i know its not that...


Reply With Quote