note 41453 added to function.file-exists
| From: | aidan@php.net | Date: | Sat, 10 Apr 2004 13:46:25 +0000 |
| Subject: | note 41453 added to function.file-exists | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-67959@lists.php.net to get a copy of this message | ||
Check if a function exists within your include_path. This functionality SHOULD be included in the
file_exists function.
<?php
function file_exists_v2 ($file)
{
foreach (explode(';', get_include_path()) as $path)
{
$fullpath = $path . '/' . $file;
if (file_exists($fullpath)) {
return true; }
}
return false;
}
?>
----
Manual Page -- http://www.php.net/manual/en/function.file-exists.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+41453
Delete -- http://master.php.net/manage/user-notes.php?action=delete+41453&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+41453&report=yes
Search -- http://master.php.net/manage/user-notes.php