
wickedxter
User
Mar 28, 2001, 10:07 PM
Post #3 of 3
(1216 views)
|
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");
|