note 41453 modified in function.file-exists by aidan

From: Date: Wed, 04 Aug 2004 08:51:14 +0000
Subject: note 41453 modified in function.file-exists by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-73905@lists.php.net to get a copy of this message
If you'd like to check if a file exists anywhere your include path, have a look at this nifty function: http://aidan.dotgeek.org/lib/?file=function.file_exists_incpath.php --was-- 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; } ?> http://php.net/manual/en/function.file-exists.php

« previous php.notes (#73905) next »