#21597 [Fbk->Opn]: Glob doesn't seem to work as expected
| From: | lucphp at braziliantranslation dot net | Date: | Sat, 25 Jan 2003 17:35:23 +0000 |
| Subject: | #21597 [Fbk->Opn]: Glob doesn't seem to work as expected | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-31224@lists.php.net to get a copy of this message | ||
ID: 21597
User updated by: lucphp@braziliantranslation.net
Reported By: lucphp@braziliantranslation.net
-Status: Feedback
+Status: Open
Bug Type: *Directory/Filesystem functions
Operating System: Windows ME
PHP Version: 4.3.0
New Comment:
Hi.
getcwd() returns "C:\WINDOWS\Desktop
Confirmed.
Luciano ES
Santos, SP - Brasil
Previous Comments:
------------------------------------------------------------------------
[2003-01-25 08:40:42] hholzgra@php.net
can you please verify that you are really in the directory you think
you are using getcwd()?
(I wrote glob() in the first place but have no Win system to play with)
------------------------------------------------------------------------
[2003-01-12 08:18:02] lucphp@braziliantranslation.net
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 this bug report at http://bugs.php.net/?id=21597&edit=1