note 76621 deleted from function.glob by cmb
| From: | cmb@php.net | Date: | Sun, 06 Oct 2019 08:23:41 +0000 |
| Subject: | note 76621 deleted from function.glob by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-212517@lists.php.net to get a copy of this message | ||
Note Submitter: josh at servebyte dot com
----
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.