> Code 1: It didnt work...
>
> #!/usr/bin/perl
>
> use CGI;
> $query = new CGI;
> my $filepath='/home/myaccount/uploads/laptop.jpg';
>
> print $query->header('image/jpeg');
> print $filepath;
>
Of cause, you didn't open the file and read the file.
You are trying to print "/home/myaccount/uploads/laptop.jpg"
to the screen, but with a image header. That's fatal error.
>
> Code 2: This code is running ok with text/html files, but not with the
> images, I hope someone here can help me.
>
>
> #!/usr/bin/perl
>
> my $filepath="/home/rce/uploads/drugs.jpg";
>
> open(IMAGE, $filepath);
> binmode IMAGE;
You also have to binmode the STDOUT
> print "Content-type: image/jpeg\n\n";
That should be .../jpeg\r\n\r\n";
Rgds,
Connie
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]