using CGI for IMAGES need help
Hi all
I have been searching the net and cant find any place on how to use cgi to display .gif or .jpeg files. Here is what my script looks like but image doesnt seem to display on the browser .... what am i doing wrong? #!/usr/bin/perl $|=1; ## clears the buffer use CGI ':standard'; print "Content-type: text/html\n\n"; print "<html>\n"; print "<body bgcolor=\"black\" text=\"white\" link=\"#FF0000\" vlink=\"#800000\">\n\n"; print "<pre>\n"; print "<font color=orange>POWERED BY LINUX </font> <img src=penguin.gif>"; print "</pre>\n"; print "</body>\n"; print "</html>\n"; |
It is an html problem not CGI or perl. Try specifying the full web path to "penguin.gif".
|
actually i tried providing full path but it still didnt seem to work. I changed permissions for full access of that picture and the picture is in same directory as the script but its still doesnt seem to work.
|
Well, maybe you should try:
Code:
printf("<IMG SRC=\"penguin.gif\">"); http://www.restorides.com/~nerd/libc...cgi-1.1.tar.gz It is really easy to use and it really helps allot when working with CGI. Hope that helps. |
Actually all im using is HTML and CGI. Dont know much about C/C++. I just gont understand why its so hard or tricky to display a simple image using CGI. Trully boggles my mind. Any other ideas would be appreciated thanks.
|
All times are GMT -5. The time now is 08:25 AM. |