Jump to content

longhollow

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

longhollow's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Almost perfect. Broke on the last output line. Changed if($today == 0) to ==1 and it works great ending output on the 1st day of the year! Thanks so much for your help!
  2. Thanks for the suggestion. I had already tried that.... Need it to only show this years entries, counting backwards from todays date to day "1". Suggested script breaks as it passes day "1" and starts requesting negative file numbers. Thanks, Bruce
  3. Hi, I'm not a php guy. Several months ago folks here suggested the code below. It has been working very well. It displays 5 lines of content, url links, from stored .txt files. Each day a new line is added and one falls off. <?php for($i=1; $i>=-3; $i--) { $today = date("z",(time()-3600))+$i; ?> - <? INCLUDE "/usr/home/bcmurray/public_html/features/$today.txt";?> <BR> <?php } ?> Now my users have asked me to offer a new page that shows an archive of my past url links. So, I need to modify the code to display all the url links for the year. It needs to start counting backwards from todays date and stop on day 1. Any help would be greatly appreciated. Thanks, Bruce
  4. Thanks, Worked fine. My less code. Wish I could find out if this loop method has less machine overhead than the original line by line approach. Anyone have any idea?
  5. I'm not a PHP guy, just cut and paste code sometimes. This works but it isn't very elegant. My page gets lots of views and I would like to reduce machine overhead and deliver the page as fast as possible. Any suggestions? Thanks! I'm creating a list of links on a page. Each day the link thats 7 days old drops off and a new one appears. The .txt files have the html link code for one day. <?$today = date("z",(time()-3600))+1;?> <?$today1 = date("z",(time()-3600));?> <?$today2 = date("z",(time()-3600))-1;?> <?$today3 = date("z",(time()-3600))-2;?> <?$today4 = date("z",(time()-3600))-3;?> <?$today5 = date("z",(time()-3600))-4;?> <?$today6 = date("z",(time()-3600))-5;?> <ul> <li><?INCLUDE "/usr/home/bcmurray/public_html/features/$today.txt";?></li> <li><?INCLUDE "/usr/home/bcmurray/public_html/features/$today1.txt";?></li> <li><?INCLUDE "/usr/home/bcmurray/public_html/features/$today2.txt";?></li> <li><?INCLUDE "/usr/home/bcmurray/public_html/features/$today3.txt";?></li> <li><?INCLUDE "/usr/home/bcmurray/public_html/features/$today4.txt";?></li> <li><?INCLUDE "/usr/home/bcmurray/public_html/features/$today5.txt";?></li> <li><?INCLUDE "/usr/home/bcmurray/public_html/features/$today6.txt";?></li> </ul></li>
×
×
  • 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.