image does not display with perl-cgi script

Discussion in 'Perl' started by a.kadriu, Apr 2, 2007.

  1. a.kadriu

    a.kadriu New Member

    Joined:
    Apr 2, 2007
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Please Help me with my first script in Perl CGI: I have this cgi-perl code:
    Code:
    #!C:\Perl\bin\perl.exe
    # hello.pl -- my first perl script!
    print "Content-type: text/html\n\n";
    print <<"EOF";
    <HTML>
    <HEAD>
    <TITLE>Hello, world1!</TITLE>
    </HEAD>
    <BODY>
    <p>
          <img src="http://localhost/icons/a.gif">     
    </BODY>
    </HTML>
    EOF
    and it works, but the image does not come up. I tried to change the image' s location, but it didn't work again.
     
  2. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,645
    Likes Received:
    87
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    http://blog.pradeep.net.in
    Did you check whether the image exists in the give path? Copy the src value and paste it in the browser address bar!
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice