uploading files
I'm making a script for uploading text files via http to my webserver.
this is a part of the script
$filename = param('file');
$dir = "/www/dir";
$info_outfile = "text.txt";
(open INFO,">$dir/$info_outfile");
while ($bytes = read($filename,$data,1024)) {
$length_info += $bytes;
print INFO $data;
}
close(INFO);
chmod 0777, "$info_upload_dir/$info_outfile";
the problem is that the script upload(or make) a 0 byte file
please help me!!! I dont understand whats happening
thanx!
Adolfo
Peter J. Boettcher posted this at 22:32 — 24th September 2001.
They have: 812 posts
Joined: Feb 2000
Did you make the form on the client side the right enctype?
Adolfo posted this at 13:20 — 25th September 2001.
They have: 32 posts
Joined: Jan 2001
yes I did
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.