1 2 function include_view($__view, $vars=NULL) { 3 # Start buffering the generated text. 4 ob_start(); 5 6 # Process the view. 7 if (!is_null($vars)) { 8 extract($vars, EXTR_OVERWRITE | EXTR_REFS); 9 } 10 include("views/$__view.php"); 11 12 # Grab the generated content and clean up. 13 $content = ob_get_contents(); 14 ob_end_clean(); 15 16 return $content; 17 }
You need to create an account or log in to post comments to this site.