# ob\_start not working

**URL:** <https://forum.kirupa.com/t/ob-start-not-working/257205>\
**Category:** Uncategorized\
**Created:** [April 11, 2008, 5:17am UTC](https://forum.kirupa.com/t/ob-start-not-working/257205 "2008-04-11T05:17:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Icy\_Penguin](https://avatars.discourse-cdn.com/v4/letter/i/f6c823/32.png) [@Icy\_Penguin](https://forum.kirupa.com/u/Icy_Penguin)\
**Post date:** [April 11, 2008, 5:17am UTC](https://forum.kirupa.com/t/ob-start-not-working/257205/1 "2008-04-11T05:17:47Z")

</div>

Hi all,

I’m in the middle of creating my own templating system - but am having some troubles with ob\_start().

This works fine (I don’t see any output):

```auto

<? ob_start(); echo "Blargh!"; $content = ob_get_contents(); ob_end_flush(); ?>

```

This doesn’t (output is still displayed):

```auto

<? ob_start(); include("layout.php"); $content = ob_get_contents(); ob_end_flush(); ?>

```

Where layout.php =

```auto

<? include "top.php"; ?>
<? include "header.php"; ?>
<? include "navigation.php"; ?>
<? include "content.php"; ?>
<? include "footer.php"; ?>
<? include "bottom.php"; ?>

```

Does output buffering not work for nested includes?
