note 32657 added to function.file-exists
| From: | abandonedsoul at msn dot com | Date: | Tue, 03 Jun 2003 23:17:30 +0000 |
| Subject: | note 32657 added to function.file-exists | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-49670@lists.php.net to get a copy of this message | ||
If you want to check for a file or directory in the current directory, you should be able to use the
following:
if (is_file("./filename.ext")) {
print "true";
}
This should fix the problem that users are posting relating to Apache and Windows, rather than using
getcwd().
----
Manual Page -- http://www.php.net/manual/en/function.file-exists.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+32657
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+32657&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+32657&report=yes