Output buffering isn't going to help, the files, when completed need to look like: <! HTML CODE> <HTML> <HEAD> <TITLE>Categories of Items</TITLE> <BODY> <?php include("nav/top_nav.html"); ?> <?php include("nav/side_nav.html"); ?> Html content <?php include("nav/bottom_nav.html"); ?> <! END HTML CODE> If all I was trying to do was pull in the files I could do that without a problem, but what I need to do is generate the whole page with the information. I attached the php file that does the site generation and maybe it will shed some light on what I am trying to do as well. TIA!! Robert -----Original Message----- From: John W. Holmes [mailto:holmes072000@xxxxxxxxxxx] Sent: Thursday, April 22, 2004 11:33 AM To: robert@xxxxxxxxxxxx; php-db@xxxxxxxxxxxxx; php-general@xxxxxxxxxxxxx Subject: Re: [PHP] Adding includes to files From: "Robert Sossomon" <robert@xxxxxxxxxxxx> > I need to add PHP calls to include a file to each page as it is > generated, the only thing is I can't get the includes to come through > correctly: > > <! Code> > $display_block .= "<?php include(\"nav/top_nav.html\"); ?>"; > $display_block .= "<?php include(\"nav/side_nav.html\"); ?>"; <! > End Code> > > At the end of the generation I write $display_block to a file as You can use output buffering: ob_start(); include("nav/top_nav.html"); include("nav/side_nav.html"); $display_block = ob_get_contents(); ob_end_clean(); ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php