Search code examples
phpcodeigniterbufferoutput-buffering

CodeIgniter - Editing Output Buffer before sent to browser?


I'm researching the PHP framework CodeIgniter. I need some help regarding editing the output before it's flushed to the user.

Usually in PHP, you can just use ob_start(); and then ob_get_clean(); to retrieve the contents.

While reading the CodeIgniter documentation, though, they say all output is already buffered.

Has anybody experience with unintentionally starting a second ob_start() ? Alternatively, can anyone talk about the CodeIgniter output buffering so I may edit it?


Solution

  • As far as I know it's handled automatically by CodeIgniter, unless you manually specify the output methods yourself. See: http://ellislab.com/codeigniter/user-guide/general/controllers.html#output

    (also congrats on deciding to use CodeIgniter, I can't get enough of this framework!)