M
Mike
I'm writing a program that will let the user upload PDF files to the
server. I've done this with images before, and I figure that they're
both binary so I should be able to use the same script. But before I
do, I'm curious if I'm going to come across any problems with it.
$file = upload('file');
open INFILE, ">$base/$file";
binmode (INFILE);
while ($bytes = read($file,$data,16384)) {
$length_info += $bytes;
print INFILE $data;
}
close INFILE;
Should this work with any PDF file? I tested it with one file that I
had, but I'm not sure how PDFs actually work.
TIA,
Mike
server. I've done this with images before, and I figure that they're
both binary so I should be able to use the same script. But before I
do, I'm curious if I'm going to come across any problems with it.
$file = upload('file');
open INFILE, ">$base/$file";
binmode (INFILE);
while ($bytes = read($file,$data,16384)) {
$length_info += $bytes;
print INFILE $data;
}
close INFILE;
Should this work with any PDF file? I tested it with one file that I
had, but I'm not sure how PDFs actually work.
TIA,
Mike