Jump to content

Day of the year


dad47466

Recommended Posts

I have a php file for each day of the year - 0101.php for Jan 1; 0102.php for Jan 2; 0103.php for Jan 3, etc.

I need to bring up January 1st's page on January 1st within a predesigned template.

The site is http://www.springfieldohio.net - and the features in question are"Birthdays" and "Almanac".  Right now, I'm using Java Script redirects - one to select the month, then a second to select the day.  The results open in a new window. 

I am trying to get the results to open in the content section of the page, but the js redirects are not doing it.

I have tried I-frames, but IE inserts scrollbars within the template, and it looks stupid.

I found this:

<?php
$date = date("md");

$handle=opendir('events');
while (($file = readdir($handle))!==false) {
 
    if ($file >= $date) {
        include("events/$file");
        }
}
closedir($handle);
?>

on webdesigns1.com - it places all 366 files within the template.

And changing the argument to if ($file = $date) produces nothing.  I also tried about a dozen different adjustments but with no positive results.

Link to comment
https://forums.phpfreaks.com/topic/22064-day-of-the-year/#findComment-98827
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.