CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
0 byte file

 



wickedxter
User

Mar 28, 2001, 7:49 PM

Post #1 of 3 (662 views)
0 byte file Can't Post

for soom reason when i upload it makes the file 0 bytes. and nothing i can think of seems to work.. any know whats wrong?



Jasmine
Administrator / Moderator

Mar 28, 2001, 9:47 PM

Post #2 of 3 (660 views)
Re: 0 byte file [In reply to] Can't Post

Can you please post the code you are using to upload?



wickedxter
User

Mar 28, 2001, 10:07 PM

Post #3 of 3 (659 views)
Re: 0 byte file [In reply to] Can't Post

ok hes the code:

$outfile = lc($file);
$outfile =~ s {.*[\:\\/]} []gos;
$outfile =~ s/[^A-Za-z0-9\._ \-=@\x80-\xFE]/_/go;
if (-e "$UploadDir/$outfile") { &error("Filename $UploadDir/$outfile already exists!"); }

open (OUTPUT,">$UploadDir/$outfile") || &error("Cannot write to file $UploadDir/$outfile");

while (read($outfile,$data,1024))
{
print OUTPUT $data;
}
close OUTPUT || &error("Couldn't close file");


 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives