note 56721 deleted from function.is-dir by betz
| From: | betz@php.net | Date: | Tue, 13 Sep 2005 13:05:04 +0000 |
| Subject: | note 56721 deleted from function.is-dir by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-95117@lists.php.net to get a copy of this message | ||
Note Submitter: Dietmar
----
to jeswanth at gmail dot com
is_dir *does* work properly, what you should be aware of is that the current working directory is
that of the *requested* script and not of the *executed* one.
E.g., let's say you have
/file.php
/some_dir/your_code.php
/some_dir/valid_user.txt
where your_code.php contains the code you posted, and file.php includes somedir/your_code.php. If
you request /file.php then php looks for /valid_user.txt, not for /some_dir/valid_user.txt
Of course the file is not found, and the else-part is executed.