Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

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

by kwoff (Friar)
on Dec 14, 2001 at 23:10 UTC ( #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?

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2022-11-29 04:05 GMT
Find Nodes?
    Voting Booth?