note 105093 added to function.file-exists
| From: | www dot freev at gmail dot com | Date: | Wed, 27 Jul 2011 13:17:23 +0000 |
| Subject: | note 105093 added to function.file-exists | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-181932@lists.php.net to get a copy of this message | ||
my function filexists() function search file firts in include_path:
<?php
function filexists($file)
{
$ps = explode(":", ini_get('include_path'));
foreach($ps as $path)
{
if(file_exists($path.'/'.$file)) return true;
}
if(file_exists($file)) return true;
return false;
}
?>
----
Server IP: 69.147.83.197
Probable Submitter: 213.238.126.252
----
Manual Page -- http://www.php.net/manual/en/function.file-exists.php
Edit -- https://master.php.net/note/edit/105093
Del: integrated -- https://master.php.net/note/delete/105093/integrated
Del: useless -- https://master.php.net/note/delete/105093/useless
Del: bad code -- https://master.php.net/note/delete/105093/bad+code
Del: spam -- https://master.php.net/note/delete/105093/spam
Del: non-english -- https://master.php.net/note/delete/105093/non-english
Del: in docs -- https://master.php.net/note/delete/105093/in+docs
Del: other reasons-- https://master.php.net/note/delete/105093
Reject -- https://master.php.net/note/reject/105093
Search -- https://master.php.net/manage/user-notes.php