9 * Get path to file from include_path
11 * @param string $file_path
12 * @param string $new_file_path
14 * @staticvar array|null
17 // $file_path, &$new_file_path
19 function smarty_core_get_include_path(&$params, &$smarty)
21 static $_path_array = null;
23 if(!isset($_path_array)) {
24 $_ini_include_path = ini_get('include_path');
26 if(strstr($_ini_include_path,';')) {
28 $_path_array = explode(';',$_ini_include_path);
30 $_path_array = explode(':',$_ini_include_path);
33 foreach ($_path_array as $_include_path) {
34 if (@is_readable
($_include_path . DIRECTORY_SEPARATOR
. $params['file_path'])) {
35 $params['new_file_path'] = $_include_path . DIRECTORY_SEPARATOR
. $params['file_path'];
42 /* vim: set expandtab: */