Loading Different Page Every Day
Moderator: General Moderators
-
stephan_pieri
- Forum Newbie
- Posts: 5
- Joined: Sun Mar 18, 2007 4:28 pm
Loading Different Page Every Day
Hello people.
Im new hear, and i have done a search in your HUGE forum, but unfortunately did not find the answer i am looking for.
What i Require.
I need a different page to be loaded every day. So on day 1, page1.htm/.php will load, and on day 2 page2.htm/php will load and so on.
What i have tried
nothing...it will get me nowhere lol.
Any help would be great guys, or if you know somewhere else which could help, im all ears.
Regards
Im new hear, and i have done a search in your HUGE forum, but unfortunately did not find the answer i am looking for.
What i Require.
I need a different page to be loaded every day. So on day 1, page1.htm/.php will load, and on day 2 page2.htm/php will load and so on.
What i have tried
nothing...it will get me nowhere lol.
Any help would be great guys, or if you know somewhere else which could help, im all ears.
Regards
-
stephan_pieri
- Forum Newbie
- Posts: 5
- Joined: Sun Mar 18, 2007 4:28 pm
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
I'll gladly help, but don't mistake that for "writing the code for you."
The concept is to have the files to display stored somewhere, either in the script or in separate files you can include. The file you choose to display is based entirely on the number of days the math returns.
Start writing some code to test it out and see how it works. Use a shorter period of time so you can see it progress a bit faster.
The concept is to have the files to display stored somewhere, either in the script or in separate files you can include. The file you choose to display is based entirely on the number of days the math returns.
Start writing some code to test it out and see how it works. Use a shorter period of time so you can see it progress a bit faster.
-
stephan_pieri
- Forum Newbie
- Posts: 5
- Joined: Sun Mar 18, 2007 4:28 pm
yeah. I want the files stored locally. Either in the same directory or in a separate folder.
Sorry. I mean i havent got a clue how the PHP code is to be structured, how i refer to pages, how i call them.
I looked at the post you suggested, and to be totally honest, the $n and $s and all of that means absolutely nothing to me.
I'm so sorry for asking this, and im hoping for this to be a quick project (a few weeks or a few months maximum)
Sorry. I mean i havent got a clue how the PHP code is to be structured, how i refer to pages, how i call them.
I looked at the post you suggested, and to be totally honest, the $n and $s and all of that means absolutely nothing to me.
I'm so sorry for asking this, and im hoping for this to be a quick project (a few weeks or a few months maximum)
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
file_get_contents(), include(), among others may be of interest.
-
stephan_pieri
- Forum Newbie
- Posts: 5
- Joined: Sun Mar 18, 2007 4:28 pm
right. Thats terrific news. Cheers for those two ...things.
I had a look at both, and i think the 'include' will work best.
Now i have to try and put a variable or something before it, then refer to the variable in inside the include.
So maybe the include code will look something like this;
include(getday".htm") where the variable be getday.
Or am i totally off target haha
Cheers once again for those suggestions, great help
I had a look at both, and i think the 'include' will work best.
Now i have to try and put a variable or something before it, then refer to the variable in inside the include.
So maybe the include code will look something like this;
include(getday".htm") where the variable be getday.
Or am i totally off target haha
Cheers once again for those suggestions, great help
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
-
stephan_pieri
- Forum Newbie
- Posts: 5
- Joined: Sun Mar 18, 2007 4:28 pm
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Give it a try, post some code, and well help you as much as it takes.stephan_pieri wrote:Great news. You two have been great help, but i am shattered and i gotta get up early so im going now. I will take a detailed look at the links you provided tomorrow, and hopefully i wont need your services on this subject.
Cheers guys