1075functiontheme_render_template($template_file, $variables){ 1076extract($variables, EXTR_SKIP); // Extract the variables to a local namespace 1077ob_start(); // Start output buffering 1078include"./$template_file"; // Include the template file 1079$contents = ob_get_contents(); // Get the contents of the buffer 1080ob_end_clean(); // End buffering and discard 1081return$contents; // Return the contents 1082}
Комментарии
А вот и ответ:
includes/theme.inc
1076 extract($variables, EXTR_SKIP); // Extract the variables to a local namespace
1077 ob_start(); // Start output buffering
1078 include "./$template_file"; // Include the template file
1079 $contents = ob_get_contents(); // Get the contents of the buffer
1080 ob_end_clean(); // End buffering and discard
1081 return $contents; // Return the contents
1082 }
Код этот из 6-ого друпала.