[phpBB Debug] PHP Warning: in file [ROOT]/includes/crs/crs_misc_functions.php on line 37: mime_content_type(): Empty filename or path Zen Cart 源代码 template_func.php
<?php
/**
* template_func Class.
*
* @package classes
* @copyright Copyright 2003-2009 Zen Cart Development Team
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: template_func.php 14141 2009-08-10 19:34:47Z wilt $
*/
if (!defined('IS_ADMIN_FLAG')) {
die('Illegal Access');
}
/**
* template_func Class.
* This class is used to for template-override calculations
*
* @package classes
*/
class template_func extends base {
function template_func($template_dir = 'default') {
$this->info = array();
}
function get_template_part($page_directory, $template_part, $file_extension = '.php') {
$directory_array = array();
if ($dir = @dir($page_directory)) {
while ($file = $dir->read()) {
if (!is_dir($page_directory . $file)) {
if (substr($file, strrpos($file, '.')) == $file_extension && preg_match($template_part, $file)) {
$directory_array[] = $file;
}
}
}