roby2k
09-19-2006, 05:55 AM
is there a script that will replace a html page with another html page by date?
so today is 19th sept id like 1.html to display and tomorrow the 20th id like 2.html to be displayed?
Lebanon
09-19-2006, 08:55 AM
am sure there is , though programming it using php would be hard at all
list your pages, use date function www.php.net/date and list ur if statements accordinaly,
tree-host
09-19-2006, 09:29 AM
The easiest way, would be to name your pages by date, so on the 19th you get it to display 19.php
then something like
<?php
$day = date('d');
include($day.'.html');
?>
Then just make sure you make all 31 pages :)
roby2k
09-19-2006, 10:15 AM
hahah cheers
<?php
$date=date('d-m');
if (file_exists('$date.'.html')) {
include('$date.'.html');
} else {
include('notfound.html');
?>
i think would prob be more stuable but i only need this for 12 set dates.
can you think of any way to make it so if it fails to pick up on one of the set dates it uses the closes date?
Xeentech
09-19-2006, 05:53 PM
You could decrement the number untill you find a page that does exist..
I don't know PHP so you can work that bit out ;)