Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

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?
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? | Other CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2022-05-25 04:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (84 votes). Check out past polls.

    Notices?