|
-
Oct 9th, 2001, 03:20 PM
#1
Thread Starter
Addicted Member
Cannot see image
I am using the following simple cgi script to generate a html page but I cannot see the image. I have a images directory in my cgi-bin folder and a file called arrow.gif but it doesn't show up on the page. Can someone tell me if the cgi looks ok ?
#!/usr/bin/perl
print "Content-type:text/html\n\n";
print <<EndHTML
<html><head><title>Test!</title></head>
<body>
<table border=1>
<tr>
<td><img src=\"images/arrow.gif\"></td>
</tr>
</table>
</body>
</html>
EndHTML
-
Oct 9th, 2001, 03:24 PM
#2
Member
><img src=\"images/arrow.gif\">
Shouldn't that be <img src="/images/arrow.gif">?
-
Oct 9th, 2001, 03:24 PM
#3
Black Cat
Check the source of the generated HTML page. I'm not sure if you need to escape the quotes in a here document.
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Oct 9th, 2001, 03:25 PM
#4
Fanatic Member
It seems to me that the bold \ should be / instead.
#!/usr/bin/perl
print "Content-type:text/html\n\n";
print <<EndHTML
<html><head><title>Test!</title></head>
<body>
<table border=1>
<tr>
<td><img src=\"images/arrow.gif\"></td>
</tr>
</table>
</body>
</html>
EndHTML
If they should be there at all?
-
Oct 9th, 2001, 03:30 PM
#5
PowerPoster
i don't think you even need them
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
-
Oct 10th, 2001, 10:25 AM
#6
Hyperactive Member
Code:
#!/usr/bin/perl
print "Content-type:text/html\n\n";
print <<EndHTML
<html><head><title>Test!</title></head>
<body>
<table border=1>
<tr>
<td><img src="/cgi-bin/images/arrow.gif"></td>
</tr>
</table>
</body>
</html>
EndHTML
you dont need to escape your qoutes you simplty need to put the correct path to you gif.
-
Oct 10th, 2001, 10:30 AM
#7
Hyperactive Member
by the way if i where you i'd keep my images in the html directory!
If you created the images directory in the html directory eg. html/images/arrow.gif
you would access it like this /images/arrow.gif
-
Oct 12th, 2001, 03:40 AM
#8
Thread Starter
Addicted Member
That was it!
I had the images in the cgi-bin directory, I didn't realise this wasn't allowed. It all seems to work fine now.
Many thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|