note 76621 added to function.glob
| From: | josh at servebyte dot com | Date: | Mon, 23 Jul 2007 12:55:18 +0000 |
| Subject: | note 76621 added to function.glob | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-128840@lists.php.net to get a copy of this message | ||
To: martinlarsen at bigfoot dot com (14-Jun-2007 01:13)
[quote]
glob() does not work if the path contains brackets "[" and "]".
For example, this will make it fail:
$files = glob("[myfolder]/*.txt");
No error is returned, just an empty array!
[/quote]
Hi there,
if you backslash the brackets, it should work. Try:
$files = glob("\[myfolder\]/*.txt");
Hope this helps.
----
Server IP: 193.95.141.37
Probable Submitter: 159.134.220.143
----
Manual Page -- http://www.php.net/manual/en/function.glob.php
Edit -- https://master.php.net/note/edit/76621
Del: integrated -- https://master.php.net/note/delete/76621/integrated
Del: useless -- https://master.php.net/note/delete/76621/useless
Del: bad code -- https://master.php.net/note/delete/76621/bad+code
Del: spam -- https://master.php.net/note/delete/76621/spam
Del: non-english -- https://master.php.net/note/delete/76621/non-english
Del: in docs -- https://master.php.net/note/delete/76621/in+docs
Del: other reasons-- https://master.php.net/note/delete/76621
Reject -- https://master.php.net/note/reject/76621
Search -- https://master.php.net/manage/user-notes.php