Hi all, 

I have the following code, which can port 1 image to browser, 
when I use Sambar Server for Win32 System.


#!C:\perl\bin\perl.exe

print "Content-type: image/jpeg\r\n\r\n";
$| = 1;
open (FILE, 'C:/my/param/image.jpg');
binmode (FILE) ; binmode(STDOUT);
while (<FILE>) { print $_ } close (FILE);

###########################################

And now, I have the following questions :
1) This script doesn't work in Apache Server at all, should I 
code them in another way ?

2) This script can only print out 1 image only, what should I
do to print multiple images? Such like Web Counters.

3) I've saw some other sample code, they would use to write
as : read (FH, $x, 4096) ; print $x ; 
What's the different with the one I wrote ?

4) I dont understand why sometime is \r\n, sometime is \r\n\r\n
while sometime is \r\r\n\n. Any difference ? And what are they
actually given impact on the output / read result ?

#############################################

Any comment, sample code, module reference are very welcome, 

Thanx alot, 
Connie




Reply via email to