dad47466 Posted September 26, 2006 Share Posted September 26, 2006 I have been unsuccessful in coming up with a script that will display a different page each day of the year.I could use any assistance offered. Quote Link to comment Share on other sites More sharing options...
Orio Posted September 26, 2006 Share Posted September 26, 2006 What do you mean?Something like this?[code]<?phpecho "Yay! It's day number ".date("z")."!!!";?>[/code]Orio. Quote Link to comment Share on other sites More sharing options...
dad47466 Posted September 26, 2006 Author Share Posted September 26, 2006 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. Quote Link to comment Share on other sites More sharing options...
AndyB Posted September 26, 2006 Share Posted September 26, 2006 = is the assignment operator, == is the equality operatorif ($file =[b][color=red]=[/color][/b] $date) Quote Link to comment Share on other sites More sharing options...
dad47466 Posted September 26, 2006 Author Share Posted September 26, 2006 Dumb mistakes happen all the time.It's working. Thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.