PDA

View Full Version : links to images when writing for scripts to go in cgi bins


Tsost
11-18-2005, 03:12 AM
When writing perl scripts to go within my website's cgi bin when I write, say, print "<img src=\"picture.gif\" ALIGN=LEFT>\n"; to show an image it doesn't show.

print "<img src=\"www.websitename\picture.gif\" ALIGN=LEFT>\n"; doesn't seem to work either.

What am i doing wrong?

mlseim
11-18-2005, 02:43 PM
Your absolute reference looks OK:

print "<img src=\"www.websitename\picture.gif\" ALIGN=LEFT>\n";

You must still have something wrong ... maybe missing .com?
Or, how about the forward slash instead of the backslash?
... was that just a typo when you posted your message?

print "<img src='www.websitename.com/picture.gif' ALIGN=LEFT>\n";

or, maybe there's another folder somewhere in there ...

print "<img src='www.websitename.com/images/picture.gif' ALIGN=LEFT>\n";

(you can also use single-quotes within the string, instead of escaped double-quotes)

hyperbole
11-18-2005, 09:49 PM
When you say ... it doesn't show... are you talking about the image or the text.

If all your seeing in the browser is the text <img src=\"picture.gif\" ALIGN=LEFT>, you need to add a header before you send out the html.

If you're getting a blank screen, you need to check the url used in the <img ... /> tag to make sure your pointing to an image.



.