file upload and file size
| From: | Wilbert Enserink | Date: | Thu, 08 Nov 2001 10:10:23 +0000 |
| Subject: | file upload and file size | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-73853@lists.php.net to get a copy of this message | ||
Hi all,
I'm busy writing a script for file upload and then showing the details of the uploaded file.
renaming the file and moving it to a specified dir goes ok. but showing detals doesn't do it
right.
I already searched on php.net for some details, but somewehere i'm doing stuff wrong. Anybody
got any ideas?
regards,
Wilbert
--------my code-----
<?php
if (is_uploaded_file($userfile)) {
$new_location="path_to_new_file_dir"
move_uploaded_file($userfile, "$new_location/$userfile_name");
} else {
echo "Possible file upload attack: filename '$userfile'.";
}
$file_size = filesize("$new_location/$userfile_name");
echo "file size=" & $file_size;
?>
--------end--------