#21597 [NEW]: Glob doesn't seem to work as expected
| From: | lucphp at braziliantranslation dot net | Date: | Sun, 12 Jan 2003 14:18:02 +0000 |
| Subject: | #21597 [NEW]: Glob doesn't seem to work as expected | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-29819@lists.php.net to get a copy of this message | ||
From: lucphp@braziliantranslation.net
Operating system: Windows ME
PHP version: 4.3.0
PHP Bug Type: *Directory/Filesystem functions
Bug description: Glob doesn't seem to work as expected
The script example provided in the glob() function page does not work for
me, running Windows ME. I tried this simpler test:
$a = glob ("*.txt");
print_r ($a);
... and I get an empty array.
Note that the script is in my c:/windows/desktop folder, and I have quite
a few text files there.
And if I run:
$a = glob ("../*.txt");
print_r ($a);
... I get the correct listing. But since the script is run from
c:/windows/desktop, glob ("../*.txt") should produce the listing of my
desktop's parent directory, i.e. c:/windows, shouldn't it?
If I state the full path to my desktop, i.e. glob
("c:/windows/desktop/*.txt"), then it works. But that is annoying because
whenever I move the script to another directory, I have to change the path
manually.
I am using PHP as a scripting language, of course.
Thanks,
Luciano ES
Santos, SP - Brasil
--
Edit bug report at http://bugs.php.net/?id=21597&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=21597&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=21597&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=21597&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=21597&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=21597&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=21597&r=support
Expected behavior: http://bugs.php.net/fix.php?id=21597&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=21597&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=21597&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=21597&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21597&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=21597&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=21597&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=21597&r=gnused