Log in

View Full Version : get date load X Header



Feckie
01-22-2009, 01:42 PM
Hi

Can anyone help me

I have a page format as follows

<!-- 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

bluewalrus
01-22-2009, 02:12 PM
<?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" ?>

Misterfley
01-22-2009, 02:15 PM
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/

Feckie
01-22-2009, 02:40 PM
<?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
$d=date('m.d');
if ($d=="1.2")
include "0202.php";
elseif ($d=="1.22")
include "0704.php";
else
include "main.php";
?>