• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • Examples
  • File List

E:/E/GEAMP/www/openbiz/openbiz/others/Smarty/libs/internals/core.get_include_path.php

00001 <?php
00017 //  $file_path, &$new_file_path
00018 
00019 function smarty_core_get_include_path(&$params, &$smarty)
00020 {
00021     static $_path_array = null;
00022 
00023     if(!isset($_path_array)) {
00024         $_ini_include_path = ini_get('include_path');
00025 
00026         if(strstr($_ini_include_path,';')) {
00027             // windows pathnames
00028             $_path_array = explode(';',$_ini_include_path);
00029         } else {
00030             $_path_array = explode(':',$_ini_include_path);
00031         }
00032     }
00033     foreach ($_path_array as $_include_path) {
00034         if (@is_readable($_include_path . DIRECTORY_SEPARATOR . $params['file_path'])) {
00035                $params['new_file_path'] = $_include_path . DIRECTORY_SEPARATOR . $params['file_path'];
00036             return true;
00037         }
00038     }
00039     return false;
00040 }
00041 
00042 /* vim: set expandtab: */
00043 
00044 ?>

Generated on Thu Apr 19 2012 17:01:16 for openbiz by  doxygen 1.7.2