|
Posted by laredotornado@zipmail.com on 08/15/06 16:43
> --.htaccess------------
> php_flag auto_prepend_file head.html
> php_flag auto_append_file foot.html
> -----------------------
> ---page.php------------
> echo $content;
> -----------------------
Regarding this idea, will the prepend happen at the very beginning of
the page? I still want each of my 15 pages to have custom titles (e.g.
the <TITLE> element is different for each) and I wouldn't want to screw
up the HTML by prepending data before the "<HTML><HEAD><TITLE>..."
elements.
Anyway, great ideas.
Thanks, -
Rik wrote:
> laredotornado@zipmail.com wrote:
> > Hi, I'm using PHP 4.3. I have 15 pages in which I need to take the
> > content of the BODY and put it in a little table ...
> >
> > <table>
> > <tr><td colspan="3"><img src="header.gif"></td></tr>
> > <tr>
> > <td><img src="left_img.gif"></td>
> > <td><!-- body content goes here --></td>
> > <td><img src="right_img.gif"></td>
> > </tr>
> > <tr><td colspan="3"><img src="bottom.gif"></td></tr>
> > </table>
> >
> > It is a pain to have to cut and paste all this HTML code (the above is
> > just an abbreviated version) into all 15 pages. And plus, if the
> > shell changes, I'll have to change it in 15 pages. Any advice on an
> > efficient way to add this to everything?
>
>
> well, first of all I really urge you to forget tables for layout and to use
> css. Tables are for tabular data only.
>
> with that out of the way:
>
> ---head.html----------
> <table>
> <tr><td colspan="3"><img src="header.gif"></td></tr>
> <tr>
> <td><img src="left_img.gif"></td>
> <td>
> ----------------------
> ---foot.html----------
> </td>
> <td><img src="right_img.gif"></td>
> </tr>
> <tr><td colspan="3"><img src="bottom.gif"></td></tr>
> </table>
> ----------------------
> --page.php------------
> include('head.html');
> /* generate content */
> include('foot.html');
> ----------------------
>
> Alternatively, you could get ALL your static HTML in these two files, andf
> all pages which need it are in the same dir: echo only the content in the
> *.php pages, and create an .htaccess:
>
> --.htaccess------------
> php_flag auto_prepend_file head.html
> php_flag auto_append_file foot.html
> -----------------------
> ---page.php------------
> echo $content;
> -----------------------
>
> Grtz,
> --
> Rik Wasmus
[Back to original message]
|