note 82269 added to function.file-exists
| From: | DavidRoe at osu1 dot php dot net | Date: | Thu, 03 Apr 2008 14:09:48 +0000 |
| Subject: | note 82269 added to function.file-exists | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-137891@lists.php.net to get a copy of this message | ||
I'm not sure if this is a bug or some kind of caching but with PHP 5.1.6 on Linux file_exists
returns false positives. The file in question was (before I deleted it) on a samba mounted file
system, it seems to work alright with a local file system.
Using the following function seems to be a workaround:
<?
function is_file_there($filename) {
return realpath($filename) !== false;
}
?>
----
Server IP: 92.48.74.199
Probable Submitter: 194.70.148.66
----
Manual Page -- http://www.php.net/manual/en/function.file-exists.php
Edit -- https://master.php.net/note/edit/82269
Del: integrated -- https://master.php.net/note/delete/82269/integrated
Del: useless -- https://master.php.net/note/delete/82269/useless
Del: bad code -- https://master.php.net/note/delete/82269/bad+code
Del: spam -- https://master.php.net/note/delete/82269/spam
Del: non-english -- https://master.php.net/note/delete/82269/non-english
Del: in docs -- https://master.php.net/note/delete/82269/in+docs
Del: other reasons-- https://master.php.net/note/delete/82269
Reject -- https://master.php.net/note/reject/82269
Search -- https://master.php.net/manage/user-notes.php