Page 1 of 1

opendir('Y/m/d') ???

Posted: Thu Nov 27, 2008 11:41 pm
by Peuplarchie
Good day to you all,
my question this time seems easy but, I dont have a clue on how to do this...

I would like to read the directory of today...

Code: Select all

 
 
if ($handle = opendir('Y/m/d,time()')) {
 
 
Can somebody help me in wording this ?

Thanks !

Re: opendir('Y/m/d') ???

Posted: Thu Nov 27, 2008 11:50 pm
by novice4eva
get the filetype(), check it is 'dir' and then filemtime(), compare it with today....

Re: opendir('Y/m/d') ???

Posted: Thu Nov 27, 2008 11:57 pm
by requinix
You're missing a call to date().

Code: Select all

opendir(date("Y/m/d"));
You don't need to give the timestamp if you're referring to now.