Results 1 to 4 of 4

Thread: get date load X Header

  1. #1
    Join Date
    Dec 2005
    Posts
    28
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default get date load X Header

    Hi

    Can anyone help me

    I have a page format as follows
    PHP Code:
    <!-- Header Block -->

    <? include("Header.php"); ?>

    <!-- / Header Block -->

    <!-- Main Block -->

    <? include("Main.php"); ?>

    <!-- / Main Block -->

    <!-- Footer Block -->

    <? include("Footer.php"); ?>

    <!-- / Footer Block -->
    What I require is that the Header loads a different page on set dates.
    ie:
    02feb.php
    14thfeb.php
    etc

    Anyone have any idea how to go about this

    thanks

  2. #2
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    <?php
    $date = date('m.j.y');
    if ($date = "2.2.09") {
    <? include("02feb.php"); ?>
    }
    if ($date = "2.14.09") {
    <? include("14thfeb.php" ?>
    ?>

    Of course if you have a lot that's going to be inconvenient so maybe something like this... Not sure if that remove / will work.

    $day = date('j/');
    $month= date('m');
    if ($day . $month = "need to automate the dates you want somehow") {
    $remove = str_replace('/', "", $day);
    <? include("$day . $month.php" ?>

  3. #3
    Join Date
    Jan 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Firefox 3 ProblemeHallo, ich habe einige klitzekleine Problemchen mit meinen FF3.

    In eBay gibt es einen kleinen "Aktualisierungs-Button", der auf der Artikelseite befindet und erst 14:59 Minuten vor Ablauf des Artikels erscheint. Im FF2 hat er funktioniert, nun im FF3 nicht mehr. Auch 2 Plug Ins funktionieren leider nicht mehr. AVG 8 Plug In und Free Downloader Plug In die mag er nicht der FF3. Weiß Jemand etwas darüber ??

    Ansonsten ist der Firefox eine Klasse für sich, Spitze

    Danke

    http://www.cleverselect-investments.de/

  4. #4
    Join Date
    Dec 2005
    Posts
    28
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by bluewalrus View Post
    <?php
    $date = date('m.j.y');
    if ($date = "2.2.09") {
    <? include("02feb.php"); ?>
    }
    if ($date = "2.14.09") {
    <? include("14thfeb.php" ?>
    ?>

    Of course if you have a lot that's going to be inconvenient so maybe something like this... Not sure if that remove / will work.

    $day = date('j/');
    $month= date('m');
    if ($day . $month = "need to automate the dates you want somehow") {
    $remove = str_replace('/', "", $day);
    <? include("$day . $month.php" ?>
    Many Thanks

    Had to change it slighty to get it to work as follows

    PHP Code:
    <?php
    $d
    =date('m.d');
    if (
    $d=="1.2")
      include 
    "0202.php";
    elseif (
    $d=="1.22")
      include 
    "0704.php";
    else
      include 
    "main.php";
    ?>
    Last edited by Feckie; 01-22-2009 at 03:17 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •