Re: including HTML
| From: | Michael Sweeney | Date: | Tue, 06 Aug 2002 21:53:35 +0000 |
| Subject: | Re: including HTML | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-111441@lists.php.net to get a copy of this message | ||
What you would do would be to break the stuff you want to include into
different files which would not be complete HTML files (ie. no header or
footer information) and then include the file that you need at the
appropriate point:
--html header stuff--
<?php
include 'path/to/body1.inc';
?>
--footer sutff--
But you might want to take a look at a template system like Smarty or
phplib. That's basically what you're talking about doing, anyway, and a
pre-written system will give you much better capability.
..mike..
On Tue, 2002-08-06 at 13:39, Alexander Ross wrote:
> Can you include an HTML file up to a certain point. Basically I have a .php
> which I want to have a static header and a static footer (the same as teh
> header and footer of everyother page on this site) and then dynamic content
> in the middle. Is there a way to include each line of html in index.html
> untill I hit a line with <!--HERE --> (or some other comment?). If so, how
> can I then do the opposit and include each line of HTML from <!--HERE--> to
> teh end of the page?
>
> Thanks
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php