<?php
// NIKAcore: core classes for PHP websites
//
// Copyright (C) 2003 NIKA Consulting, Inc.
//
// This file is part of NIKAcore.
//
// NIKAcore is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License as published by the Free
// Software Foundation; either version 2.1 of the License, or (at your option)
// any later version.
//
// NIKAcore is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
// more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with NIKAcore; if not, write to the Free Software Foundation, Inc., 59
// Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// Contact hide@address.com with comments, questions, or patches.
function file_exists_in_include_path($file) {
if (substr($file,0,1) == "/") return file_exists($file);
$incpath = ini_get("include_path");
foreach (explode(":",$incpath) as $path) {
if (file_exists($path."/".$file)) return true;
}
return false;
}
?>