<?php if(isset($_FILES['uploaded'])){ # Define target $target = '/srv/www/domain.de/upload/'.basename($_FILES['uploaded']['name']) ; # print informations for uploaded file echo '<pre>'; print_r($_FILES); echo '</pre>'; if (move_uploaded_file($_FILES['uploaded']['tmp_name'],$target)) { echo 'OK!'; } } else { echo '<form enctype="multipart/form-data" action="'.$_SERVER["PHP_SELF"].'" method="POST">'; echo 'File: <input name="uploaded" type="file"/><input type="submit" value="Upload"/>'; echo '</form>'; } ?>