Computing.Net > Forums > Programming > PHP : Upload files

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

PHP : Upload files

Reply to Message Icon

Name: nnn
Date: December 15, 2002 at 11:38:45 Pacific
OS: linux
CPU/Ram: 1
Comment:

If anyone could help me out that would be great!
I try upload files with regular form:
"form enctype=multipart/form-data action=upload.php method=post"
"input type=file name=userfile"...
but when i click "Submit", my upload.php script does not receive $userfile, it is empty.
Please,help !!!



Sponsored Link
Ads by Google

Response Number 1
Name: micah
Date: December 15, 2002 at 16:07:45 Pacific
Reply:

alright, in the next page try this:

if( is_uploaded_file($_FILES['userfile']['tmp_name'])) {
$filename = $_FILES['userfile']['tmp_name'];

$realname = $_FILES['userfile']['name'];


copy($_FILES['userfile']['tmp_name'], "c:\\HTML\\uploads\\" .$realname) or die ("Error uploading file.");
}


0

Response Number 2
Name: nnn
Date: December 15, 2002 at 19:17:55 Pacific
Reply:

Thank you, i tried this code. But i received
is_uploaded_file($_FILES['userfile'])==false in my case.
Why this happening?


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


C program help needed Directing form output to ...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: PHP : Upload files

php upload www.computing.net/answers/programming/php-upload/10227.html

PHP Upload Problem. www.computing.net/answers/programming/php-upload-problem/11156.html

upload files using html www.computing.net/answers/programming/upload-files-using-html/6862.html