Posted By

Mikker on 07/23/07


Tagged

include


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

Mikker
silentbob84


Saving output of include() to a var


 / Published in: PHP
 

I use this instead of filegetcontents() to allow the use of php-tags in the include files.

  1. <?php
  2. include_once($file);
  3. $site = ob_get_clean();
  4.  
  5. print $site;
  6. ?>

Report this snippet  

You need to login to post a comment.