PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old May 6th, 2003, 07:30 PM
Ed Vinson Ed Vinson is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 1 Ed Vinson User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Cool Please Help- PHP- I need to include a file named for a future date to create calendar

Greetings,

Any assistance would be deeply appreciated. I am confused as to how I can include a file named for a future date, say 3 days in the future. I would like to name the files something like YYYYmmdd.txt.

The purpose is to have a dynamic calendar that will show the next seven days of events, patched together from 7 text files.

Sorry if this has already been asnwered here, but I can't seem to find it if it has.

Reply With Quote
  #2  
Old May 7th, 2003, 02:49 AM
fakker fakker is offline
The calm b4 the storm
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Manchester, UK
Posts: 404 fakker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via Yahoo to fakker
hey ed,

welcome to the devarticles web site!!

you could do something like compare the current system date to that of any files on the server.....

eg:

PHP Code:
//read the directory for files
$directory opendir(".");

//get the current date in the right format (Y = YYYY, m = MM, d = DD)
$todaysDate date("Ymd",$time);

//do a loop
while($filename readdir($directory))
{
    
//compare each file name to the current date
    
if ($filename == $todaysDate ".txt")
    {
        
//do something with the file
    
}




that in theory might work, but I'd have to look more closely to see if it would work in practise... but it's a start!!

Is that the sort of thing you mean?
__________________
Matt 'Fakker' Facer

mattfacer.com

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > Please Help- PHP- I need to include a file named for a future date to create calendar


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT