in reply to Re: Display an image with a CGI program?
in thread Display an image with a CGI program?

Hi.

Thanks for the help!

I moved the image file to the parent directory of both 'htdocs' and 'cgi-bin' then referenced it with '../cgi-bin/pixel.gif' and it worked.
  • Comment on Re^2: Display an image with a CGI program?

Replies are listed 'Best First'.
Re^3: Display an image with a CGI program?
by Anonymous Monk on Mar 14, 2011 at 09:24 UTC
    i am also facing a similar kind of problem. Below is my code.The image is not displayed. Can anyone help me out.
    use CGI qw(:all); print "Content-type:text/html\n\n"; print '<HTML> <head></head> <body> <h1> <img src="../images/example_product_loading.gif" alt="site_imag +e" width="800" height="200"> Test Imageeeee. </h1> </body> </HTML>';

      Did you check the webserver logs to see if there is any indication of a problem?

      Can you access the image directly, without your script?

      Read the thread you replied to, as it contains the answer to your question.

        No i cannot access the image dirctly. It is picking up the particular .gif file but is showing a "X" sign.