Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20

Thread: If else

  1. #11
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    You can just do:
    PHP Code:
    <?php
    $includes 
    = array(
    "Monday" => "monday.html",
    "Tuesday" => "tuesday.html",
    "Wednesday" => "wednesday.html",
    "Thursday" => "thursday.html",
    "Friday" => "friday.html",
    "Saturday" => "saturday.html",
    "Default" => "default.html"
    );
    $day ucfirst(date('l'));
    if(isset(
    $includes[$day])){
        include(
    "/hsphere/local/home/makukulo/fotogenicos.net/seleccao/byremus/".$includes[$day]);
    } else {
        include(
    "/hsphere/local/home/makukulo/fotogenicos.net/seleccao/byremus/".$includes['Default']);
    }
    ?>
    Jeremy | jfein.net

  2. The Following User Says Thank You to Nile For This Useful Post:

    fer (02-15-2009)

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

    Default

    Thanks
    Works,

    But,today show the file from saturday.

  4. #13
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    I'm glad to help you fer! Your welcome!

    What do you mean by "but, today show the file from saturday?"
    Jeremy | jfein.net

  5. The Following User Says Thank You to Nile For This Useful Post:

    fer (02-15-2009)

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

    Default

    Thanks,

    I'm forgot ,the server have the time zone from New york and I'm in Portugal/Lisbon more 5 hours and is Sunday.

    Thanks for your help

    Fernando

  7. #15
    Join Date
    Jan 2009
    Posts
    14
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    It's possible make same changes in this code to change at 00:00 am portuguese hour.

  8. #16
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Instead of using days you want it to change at 00:00 AM portuguese hour? Is that what you want(sorry, I didn't fully understand)
    Jeremy | jfein.net

  9. #17
    Join Date
    Jan 2009
    Posts
    14
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Yap,my english is very poor.Sorry

    For example

    Now, the script just include the file from sunday at 5:00 am portuguese hour.My question is,it's possible same code because the time difference between the time server and local time.

    Hope you understand :|

  10. #18
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Ok, I'll see what I can do, but should it use Monday, Tuesday, *day, for other time zones?
    Jeremy | jfein.net

  11. #19
    Join Date
    Jan 2009
    Posts
    14
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Hi,

    The code work's good.
    Thanks,

    I only need the Portuguese time zone.More 6 hours.

    Thanks for your great help.

  12. #20
    Join Date
    Jan 2009
    Posts
    14
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    I will try this code to see if work's.

    PHP Code:
    putenv('TZ=Europe/Lisbon'); 

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
  •