Page 1 of 1

glob() order of list?

Posted: Sun Jan 03, 2010 5:07 am
by arbitter
I get this warning when I try the glob_onlydir() :

Fatal error: Call to undefined function glob_onlydir() in

but when I use glob(), it does work.
I have XAMPP, php 5.3.0, so I don't understand why it doesn't work...

Are there other alternatives so I only get the directories, using glob()?

I've found a way to fix this. I just used glob("*'10"), seen all the directories end with '10. Now the only problem is, can you sort something with glob()? So the files wich were added the most recently go to the bottom?

Re: glob() order of list?

Posted: Tue Jan 05, 2010 4:57 pm
by pickle
Where did you see glob_onlydir() defined as a function? It's supposed to be GLOB_ONLYDIR - as in a global that can be passed as an argument to glob(). The docs should tell you what you need.

Re: glob() order of list?

Posted: Wed Jan 06, 2010 6:47 am
by arbitter
Well, I found it on a couple of sites... but now that you mention it, if I search fr how you say glob_onlydir is, it is indeed as you say so. My bad.