My favorites | Sign in
Project Logo
Project hosting will be READ-ONLY Wednesday at 8am PST due to brief network maintenance.
                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// This code was taken from the online php manual at:
// http://us3.php.net/features.file-upload
<?php
$uploaddir = './';
$uploadfile = $uploaddir . basename($_FILES['uploadFormElement']['name']);
echo '<pre>';
if (move_uploaded_file($_FILES['uploadFormElement']['tmp_name'], $uploadfile)) {
echo "File is valid, and was successfully uploaded.\n";
} else {
echo "Possible file uploadhttp://us3.php.net/features.file-upload attack!\n";
}

echo 'Here is some more debugging info:';
print_r($_FILES);
print "</pre>";
?>
Show details Hide details

Change log

r14 by fongcn on Feb 19, 2008   Diff
[No log message]
Go to: 
Project members, sign in to write a code review

Older revisions

r13 by fongcn on Feb 19, 2008   Diff
Initial import.
All revisions of this file

File info

Size: 525 bytes, 16 lines
Hosted by Google Code