|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-01-25 08:40 UTC] hholzgra@php.net
[2003-01-25 11:35 UTC] lucphp at braziliantranslation dot net
[2003-01-27 10:33 UTC] edink@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 22:00:01 2025 UTC |
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