in reply to Re: To display images using CGI
in thread To display images using CGI

The file logo.jpg is in the same directory as the cgi script.
But the image is not dispalyed. Instead an icon saying that image not displayed is present.
Please help me.
Thanks.

Replies are listed 'Best First'.
Re^3: To display images using CGI
by Cody Pendant (Prior) on Jul 24, 2006 at 06:58 UTC
    The file logo.jpg is in the same directory as the cgi script

    Please specify for us exactly which folder the script is in, which folder the image is in, and which URL you're using to look at the script.

    Then use your browser (right-click on the image) to find out exactly where the browser thinks the image is, and tell us that.

    The only other possibility I can think of is that there's something wrong with the image. What happens when you look at it directly with the browser?



    ($_='kkvvttuu bbooppuuiiffss qqffssmm iibbddllffss')
    =~y~b-v~a-z~s; print
Re^3: To display images using CGI
by syphilis (Archbishop) on Jul 24, 2006 at 06:01 UTC
    The file logo.jpg is in the same directory as the cgi script

    Actually, the way you've written it, I think 'logo.jpg' needs to be in the cwd (current working directory) which is not necessarily the same directory as the cgi script. You could modify the script to 'use Cwd;' and 'print getcwd();' so that you can check on just which directory is the cwd.

    What happens if you specify the full path to logo.jpg in the script ?

    Cheers,
    Rob