<?php
$directory = '/public_html/';
echo "user file = $userfile<br>\n";
echo "user file name = $userfile_name<br>\n";
echo "user file size = $userfile_size<br>\n";
echo "user file type = $userfile_type<br>\n";
if (!copy($userfile, $directory.$userfile_name)) {
print("failed to copy $userfile...<br>\n");
}
if ( $userfile_type == 'text/plain' ) {
}
else if ( ($userfile_type == 'image/pjpeg') ||
($userfile_type == 'image/bmp') ||
($userfile_type=='image/gif') ) {
echo "<img src=images/$userfile_name><br>\n";
}
?>
-------------------------------------
user file = /tmp/phpC48Bsi
user file name = hp.txt
user file size = 15230
user file type = application/octet-stream
Warning: copy(/public_html/hp.txt): failed to open stream: No such file or directory in /home/ebay555/public_html/fileupload.php on line 8
failed to copy /tmp/phpC48Bsi...
what am i mistake?
thanks
