in reply to <img> tag does not work in my perl/cgi code

Is the image really located at .../cgi-bin/images/image.jpg?

images/image.jpg
should probably one of:
../images/image.jpg
/images/image.jpg

Replies are listed 'Best First'.
Re^2: <img> tag does not work in my perl/cgi code
by vit (Friar) on Feb 23, 2008 at 21:28 UTC
    Yes, exactly there. Besides, when I get source from my web page where image is not shown, save as HTML file, place it in /cgi-bin/ directory it opens with image. Why?

      vit, webservers are not usually configured to render images in a CGI/executable mapped directory. The only thing that happens to files residing in these trees is that they are executed (ie. scripts etc.) Images and HTML docs should never reside in this tree.

      Images, HTML documents, etc., should reside in the non-executable side of the webserver which is mapped so that the content is merely displayed (and *NOT* executed). This tree is usually named "htdocs" (in the Unix world, in MS-IIS it's named something else).

      If you view the files statically (ie. via your filesystem), the configured limitations of the webserver mappings are not imposed, thus you can view the image successfully.


      Your wish is my commandline.