예제 #1
0
파일: runtime.php 프로젝트: nikic/prephp
function prephp_rt_prepareInclude($caller, $fileName)
{
    require_once PREPHP_DIR . 'classes/Path.php';
    foreach (Prephp_Path::possiblePaths($fileName, $caller) as $path) {
        if (!file_exists($path)) {
            continue;
        }
        if (substr($path, -4) == '.php' && ($inCache = Prephp_Core::getInstance()->process($path))) {
            return $inCache;
        }
        return $path;
    }
    // let php throw some nice error message
    return $fileName;
}
예제 #2
0
파일: Path.php 프로젝트: nikic/prephp
 public static function init()
 {
     self::$win = PHP_OS == 'WINNT' || PHP_OS == 'WIN32';
 }