note 101369 deleted from function.is-dir by danbrown
| From: | danbrown@php.net | Date: | Mon, 13 Dec 2010 00:40:43 +0000 |
| Subject: | note 101369 deleted from function.is-dir by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-174838@lists.php.net to get a copy of this message | ||
Note Submitter: krioux at gmail dot com
----
I think this will help all of you out there that are having problems with is_dir() returning false
on known directories.
I viewed the above posting about the relative and absolute paths causing problems and I tried his
solution to no avail. I am using a hosting service and probably don't have the access
necessary for his solution to work.
Alternatively I discovered a solution on my own and it seems to work oodles better:
**Simply use chdir() first to switch to the dir you want to read. Then use $var=
opendir("."):
ex:
chdir('../photos');
$dirvar= opendir(".");
//so far so good anyhow