You haven't really given enough data to be sure, but here's my guess at what is happening.
Your CGI program and the image are both in the /cgi-bin directory on your web server. Your web server is almost certainly configured to treat all requests for content within cgi-bin as a request for executable content. Therefore here's what happens:
If this is the case, there are a few lessons you can learn:
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
In reply to Re: To display images using CGI
by davorg
in thread To display images using CGI
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |