Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: Display gif in CGI page

by PhillipHuang (Beadle)
on Dec 08, 2011 at 09:52 UTC ( [id://942383]=note: print w/replies, xml ) Need Help??


in reply to Re: Display gif in CGI page
in thread Display gif in CGI page

Thanks, gif displayed when remove 'start_html' lines. CGI manual says'The start_html() routine creates the top of the page, along with a lot of optional information that controls the page's appearance and behavior.This method returns a canned HTML header and the opening <body> tag. '. It seems to have nothing with displaying images, I am still confused why remove it can take effect.

Replies are listed 'Best First'.
Re^3: Display gif in CGI page
by tobyink (Canon) on Dec 08, 2011 at 09:57 UTC

    For the same reason that:

    cat foo.html bar.gif baz.html > quux.gif

    will create a file that is neither valid HTML nor a valid GIF.

    (Interestingly cat bar.gif baz.html > quux.gif does create a valid GIF.)

Re^3: Display gif in CGI page
by choroba (Cardinal) on Dec 08, 2011 at 09:55 UTC
    Because calling it adds some lines to the output that do not belong to the image. The "image file" thus becomes corrupted and cannot be displayed (or even cannot be recognised as a picture).

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2024-04-25 15:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found