Jump to content

bridlodian

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Male

bridlodian's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi, I am trying to do a simple page which will display a different Javascript Jigsaw every day. The code i have been using is the following. :- <?php // create an array with the files you wish to use in $dirarray[1] = "day1.html"; $dirarray[2] = "day2.html"; $dirarray[3] = "day3.html"; $dirarray[4] = "day4.html"; $dirarray[5] = "day5.html"; $dirarray[6] = "day6.html"; $dirarray[7] = "day7.html"; $dirarray[8] = "day8.html"; $dirarray[9] = "day9.html"; $dirarray[10] = "day10.html"; $dirarray[11] = "day11.html"; $dirarray[12] = "day12.html"; $dirarray[13] = "day13.html"; $dirarray[14] = "day14.html"; $dirarray[15] = "day15.html"; $dirarray[16] = "day16.html"; $dirarray[17] = "day17.html"; $dirarray[18] = "day18.html"; $dirarray[19] = "day19.html"; $dirarray[20] = "day20.html"; $dirarray[21] = "day21.html"; $dirarray[22] = "day22.html"; $dirarray[23] = "day23.html"; $dirarray[24] = "day24.html"; $dirarray[25] = "day25.html"; $dirarray[26] = "day26.html"; $dirarray[27] = "day27.html"; $dirarray[28] = "day28.html"; $dirarray[29] = "day29.html"; $dirarray[30] = "day30.html"; $dirarray[31] = "day31.html"; // copy the element in the array corresponding to today's date if (!copy($dirarray[date], "../index.html")) { echo "failed to copy...\n"; } ?> The effect iam after is the Jigsaw will appear on the page...ie 1sr December will be a partridge as in 1st day of christmas, then the 2nd december will be Jigsaw of 2 turtle doves etc etc. I have the script to install for the jigsaws and have the html pages dated from day1.html to day31.html as listed in the code above, but no idea where to put the code above so that is will display the day1.html on the 1st and day2.html on the 2nd etc. I have them in a directory called advent with 2 folders one named index.html (which is a blank page) and the file with the above code i have in advent.php, but also tried it at index.php Hope i am making sense, I am a complete novice when it comes to php, and have been trying to make this script work for the last 9 hours. So if anyone can please help me i would be very greatful Many thanks Mic
×
×
  • 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.