Hi monks, I'm diving into perl cgi and I can't figure out why my script doesn't display images, rather broken links when executed. The script is:
#!/usr/bin/perl -w $imagePath = "http://my.domain/images/header_glow.jpg"; print "Content-type: text/html\n\n"; print <<ENDHTML; <html> <head> <title>A Page</title> </head> <body background=$imagePath> <h3>HELLO</H3> <img src=$imagePath> </body> </html> ENDHTML
I tried using different paths to my image, absolute, relative, but none show. However, if I right click on the broken image and say view image, it takes me right to it. That's what frustrates me more. Thanks, Joe

*******

I have since solved my problem. My domain provider, mydomain.com, uses one big frame to redirect people. So you get a frame on their server that that has a frame source to my actual computer, http://pcp04397155pcs.nrockv01.md.comcast.net. So therefore, anything with my domain in it is going to show up as a frame with what I actually needed, not the image itself.

Thanks to all your monks for your advice!


In reply to Broken Images....I don't understand by rawjoeshaw

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.