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

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Peuplarchie
Forum Contributor
Posts: 148
Joined: Sat Feb 04, 2006 10:49 pm

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

Post 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 !
User avatar
novice4eva
Forum Contributor
Posts: 327
Joined: Thu Mar 29, 2007 3:48 am
Location: Nepal

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

Post by novice4eva »

get the filetype(), check it is 'dir' and then filemtime(), compare it with today....
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

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

Post 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.
Post Reply