English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I know already how to make a website. I want to know how to let users browse to a file of a certain type and upload it to my site.

2006-12-12 13:17:47 · 3 answers · asked by ScytheTleppo 2 in Computers & Internet Programming & Design

since someone responded answering me incorrectly, I'll be more specific.

How do I allow a person to be looking at my site and click a 'upload a file' button, then they can pick a file from their computer and upload it to my website?

2006-12-12 13:22:59 · update #1

3 answers

Php upload code example
this is quite incomplete for obvious reasons

// In PHP versions earlier than 4.1.0, $HTTP_POST_FILES should be used instead
// of $_FILES.

echo 'Upload result:
'; // At least one symbol should be sent to response!!!

$uploaddir = '/home/uploads/';
$uploadfile = $uploaddir . basename($_FILES['Filedata']['name']);

echo '

';
if (move_uploaded_file($_FILES['Filedata']['tmp_name'], $uploadfile)) {
echo "File is valid, and was successfully uploaded.\n";
} else {
echo "Possible file upload attack!\n";
}

echo 'Here is some more debugging info:';
print_r($_FILES);

echo "
";

?>

ok enough of that the link below can give you some free ready built systems to do what you want.

http://www.hotscripts.com/search/13243213.html

and P.S. you don’t have to ftp geeze some people……

2006-12-12 14:04:58 · answer #1 · answered by Anonymous · 0 0

Create a form. Use a server side script to intercept the uploaded file.

2006-12-12 21:28:13 · answer #2 · answered by csanon 6 · 0 0

you dont upload files using a browser but firefox has an extension that lets you ftp your files to your host. much better if you use filezilla.

2006-12-12 21:21:08 · answer #3 · answered by pol.b 2 · 0 0

fedest.com, questions and answers