Platinum Partner

Very Simple Php File Upload

I think this is the minimum necessary to upload a file in php. First, the form, index.php:


Send this file:
Next, the php to accept the file, upload.php "; if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) { echo "File is valid, and was successfully uploaded.\n"; } else { echo "Upload failed"; } echo "

"; echo '
';
echo 'Here is some more debugging info:';
print_r($_FILES);
print "
"; ?>
{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}