<?php
-$Page->api = $_SERVER['HTTP_ACCEPT'] == 'text/plain';
-
function userupload($input, $target = NULL, $filename = NULL)
{
switch ($input['error']) {
$target .= $input['name'];
}
+ if (file_exists($target)) {
+ throw new Exception("bestandsnaam al aanwezig op $target");
+ }
if (!@move_uploaded_file($input['tmp_name'], $target)) {
throw new Exception("bestand kon niet worden opgeslagen in $target");
}