FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Output buffering in included file
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Output buffering in included file [message #178723 is a reply to message #178722] Tue, 24 July 2012 20:42 Go to previous messageGo to previous message
Peter H. Coffin is currently offline  Peter H. Coffin
Messages: 245
Registered: September 2010
Karma:
Senior Member
On Tue, 24 Jul 2012 13:07:20 -0700 (PDT), Dani wrote:
> Hello everybody,
> instead of using (e.g. in index.php)
>
> <?php
> ob_start();
> include('included-file.php');
> $output = ob_get_clean();
> echo $output;
> ?>
>
> to store the output buffer into a variable, can I use in included-file.php
>
> <?php
> ob_start();
> // file content
> ob_end_flush();
> ?>
>
> and in index.php
>
> <?php
> ob_start();
> include('included-file.php');
> ?>
>
> ?

Did you try it? Did it work?

--
You can lead an idiot to knowledge but you cannot make him think. You
can, however, rectally insert the information, printed on stone
tablets, using a sharpened poker.
-- Nicolai
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Web page design
Next Topic: ncurses on windows
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 01:49:23 GMT 2024

Total time taken to generate the page: 0.05082 seconds