Results 1 to 6 of 6

Thread: Unable to view Image inside HTML with PERL+CGI

  1. #1
    Registered
    Join Date
    Mar 2010
    Location
    INDIA, TN, Chennai
    Posts
    2
    Rep Power
    0

    Smile Unable to view Image inside HTML with PERL+CGI

    Dear Guys,

    I'm New to PERL , I'm trying to create a webpage with a Logo in PERL+CGI.

    But the problem is, i cannot view the image in the HTML .
    The HTML Styles are loading perfectly, & a '|X|' box is showing instead of the image.
    But it works fine in HTML, I can't understand why the img not viewing.

    Here is my code:
    Code:
    #!C:/Perl/bin/perl.exe
    use CGI;
    $q = new CGI;
    print "Content-type:text/html\n\n";
    print '<HTML>
           <head></head>
           <body>
           <h1>
           <img alt="LOGO" src="LOGO.gif" alt="LOGO"/>
           My Name is SaRaVaNaN.
           </h1>
           </body>
           </HTML>';

    Please share your comments on this.

  2. #2
    Custom User Title entrecon's Avatar
    Join Date
    Aug 2006
    Location
    Michigan
    Posts
    2,742
    Rep Power
    17
    You may have already checked this, but is the image in the same folder and is it called exactly LOGO.gif? keep in mind that LOGO.gif is not the same as Logo.gif, logo.gif, or LOGO.GIF. All of those are unique file names.
    ________________________________
    Find me on twitter: @entrecon

  3. #3
    Former Spam Filter (EU) IanS's Avatar
    Join Date
    Mar 2004
    Location
    Washington (THE original UK one!)
    Posts
    12,964
    Rep Power
    30
    I think this may be another homework question that has slipped through. Take that into consideration when answering!
    This is a Powweb customer
    helping Powweb customer forum.

    I am a customer just like you!!

    Some matters can only be answered by staff or support.
    Give it a go - ask here first!

  4. #4
    Thinkin' out loud again Builder's Avatar
    Join Date
    Nov 2002
    Location
    Illinois
    Posts
    2,088
    Rep Power
    19
    Some hosts will not serve images and other "static" content from the cgi-bin. Moving the image to another folder and adjusting the path is the solution in that situation. I get at least partial credit for your grade now.
    A good friend will come and bail you out of jail...
    but a true friend will be sitting next to you saying,
    "Damn... that was fun!"

  5. #5
    Registered
    Join Date
    Mar 2010
    Location
    INDIA, TN, Chennai
    Posts
    2
    Rep Power
    0

    Arrow

    Hello entrecon,

    Yes, The image is exactly LOGO.gif & its in the same folder.

    ====================

    Hai Builder,

    I checked with different paths also... but still its not viewing.

    Please Give me some more suggestions to solve this.

    =============

    Thanks for all your Replies.

    Keep Smiling... Keep Thinking... & Keep in Touch.......

  6. #6
    Custom User Title entrecon's Avatar
    Join Date
    Aug 2006
    Location
    Michigan
    Posts
    2,742
    Rep Power
    17
    I wasn't sure if it was homework, or if it was a self-study thing. I hate helping people with homework, but think it is great if they are trying to learn on their own.
    ________________________________
    Find me on twitter: @entrecon

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •