Sound like the perfect job for Output Buffering. I only recently learned about these functions and they're great! There are four functions you need to be aware of..
ob_start() Starts output buffering anything going out to the screen is routed to the buffer. ob_flush() Outputs the entire buffer. ob_clean() Cleans the buffer. ob_get_contents() Setting this to a variable will put the contents of the buffer into that variable. What you can do to combine all headers and page elements then essentially "blit" the whole thing to the screen is this... ob_start(); header("whatever"); header("whatever"); include("header.html"); include("footer.html"); ob_flush(); Yes I believe it really is that simple. :) Will only work with the most recent versions of PHP but I hope it helps. Good luck. -- Kevin Stone [EMAIL PROTECTED] www.helpelf.com > -----Original Message----- > From: karthikeyan [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 31, 2002 9:59 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Pregenerating Script > > Hi Guys, > > I want a php script which takes 4 parameters : > > - header file > - body file > - footer file > - OUTPUT file > > What it should do is combine 1. header, 2. body, and 3. footer and save > it as 4. OUTPUT file > > How do i do that. > > Any help with sampe code will be greatly appreciated. > > Regards, > > karthikeyan b -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]