in reply to Re: Uploading and NT
in thread Uploading and NT

Update: Actually the most varations I tried should have worked. But I found out what the real problem was. In the filename I gave a concatenated the filename with a date/time stamp.Well in unix a : in a filename is no problem, well in NT it is. Problem solved, and concluded the most difficult problems are not the coding, but knowing what the Os specifics are.

All by all a experience richer!


Damn,
I,m guilty of not testing code... This was an example. My code which I tested worked on linux.

$basedir = "/home/geert/www/cv"; $onnum = 1; while ($onnum != 11) { $file = $req->param("FILE$onnum"); if ($file ne "") { $filename = $file; $filename =~ s!^.*(\\|\/)!!; open (OUTFILE, ">$basedir/$filename"); print "$basedir/$filename<br>"; while (my $bytesread = read($file, my $buffer, 1024)) { print OUTFILE $buffer; } close (OUTFILE); } $onnum++; }

This worked, but it doesn't work on NT. And I used binmode...

--
My opinions may have changed,
but not the fact that I am right