2 function userupload($input, $target)
4 switch ($input['error']) {
7 case UPLOAD_ERR_NO_FILE:
10 throw new Exception("Afbeelding niet goed ontvangen.");
12 if (!@move_uploaded_file($input['tmp_name'], $target)) {
13 throw new Exception("Fout bij opslaan.");
16 foreach (@glob('thumb/*/') as $thumbres) {
17 # attempt to remove old derivations
18 @unlink($thumbres . '/' . $target);