Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: How do I display a jpeg in perl to HTML

by kwoff (Friar)
on Dec 14, 2001 at 23:10 UTC ( [id://132034]=note: print w/replies, xml ) Need Help??


in reply to How do I display a jpeg in perl to HTML

One note: don't leave blank space above the 'Content-type' header.

Another thing: if your CGI scripts are separate from the HTML (usually they are -- say, ScriptAlias of /cgi-bin and DocumentRoot of /usr/local/apache/htdocs), you have to be careful what "base" the image URL is relative to. You might have to put something like

... <HEAD> <BASE HREF="http://${hostname}${baseurl}"> ...

Replies are listed 'Best First'.
Re: Re: How do I display a jpeg in perl to HTML
by impossiblerobot (Deacon) on Dec 15, 2001 at 03:07 UTC
    To elaborate on what kwoff said:

    Some web servers are set up to attempt to execute any file located in the cgi-bin directory. In that case, you'll have to put any images under your normal HTML directory, then (as kwoff mentioned) reference them in your script from your document root (or with a full URL).

    Impossible Robot

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://132034]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-04-26 09:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found