Hi Guys,

I have a problem that is probably fairly simple but is causing me reall problems and stress (deadline looming) :(

Thank you so much to anyone who can offer some advice on this one

I dont know how to handle the following problem. I thought I had the solution but it doesnt work and now I dont know if I'm even using the right approach. I'm still pretty new to perl. I can do some big scripts but I'm self taught so I havent had the benefit of a teacher to ask stupid questions to!

So:

I have a typical html page that contains a form. The form accepts a username and password and calls a script.

The script validates the user. Thats all fine and the code works perfectly.

But here's what I dont get:

Most webpages obviously have a lot of static content like menus and banners and stuff. To include this stuff I just got all the code from a typical page and put it into a heredoc in my script and output it like that. It didnt work.

So I guess my question is:

How do you include all the static content on a page cleanly.

The static html from my 'typical' html page contains ssi virtual include statements for things like the header and footer. Can ssi's be called in the cgi-bin

Another related question is- if I want to include a picture on the page that my script makes, do I need to make the link relative to the cgi-bin, or do I act like I'm in htdocs? I've seen behaviour that really confused me there?

Well thats it! Thank you to anyone who can offer some advice on any of the questions back there. I reall really appreciate it. You'll be making the sun shine again! :)

Kind Regards All

Simon


In reply to Serving up static content with perl? by sh856531

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.