note 73967 added to function.glob
| From: | alan at ridersite dot org | Date: | Sun, 18 Mar 2007 19:26:28 +0000 |
| Subject: | note 73967 added to function.glob | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-124577@lists.php.net to get a copy of this message | ||
A couple of notes:
glob() handles symbolic filesystem links and resolves references to './', '../'
nicely and handles an extra '/' character , at least on X-systems. e.g.,
glob("../*") will do next higher dir.
This is good to use so warnings or errors show as "../foo" and not your system's full
path.
Several of the examples use a notation "*.*" when just plain "*" does the same
thing. The "*.*" notation is misleading as it implies foo.ext will not be found with
"*" because the "." is not present.
Watch the flags must not be strings. They are defined constants. Thus,
glob("../*", GLOB_ONLYDIR) works;
glob("../*", "GLOB_ONLYDIR") does not.
----
Server IP: 69.147.83.197
Probable Submitter: 69.255.41.127
----
Manual Page -- http://www.php.net/manual/en/function.glob.php
Edit -- https://master.php.net/note/edit/73967
Del: integrated -- https://master.php.net/note/delete/73967/integrated
Del: useless -- https://master.php.net/note/delete/73967/useless
Del: bad code -- https://master.php.net/note/delete/73967/bad+code
Del: spam -- https://master.php.net/note/delete/73967/spam
Del: non-english -- https://master.php.net/note/delete/73967/non-english
Del: in docs -- https://master.php.net/note/delete/73967/in+docs
Del: other reasons-- https://master.php.net/note/delete/73967
Reject -- https://master.php.net/note/reject/73967
Search -- https://master.php.net/manage/user-notes.php