Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
Molim pomoć - nedjelja ili drugi dan - php

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side
View previous topic :: View next topic  
Author Message
vdarlic



Joined: 07 May 2007
Posts: 77
Location: Split

PostPosted: 16.03.2008 18:50    Post subject: Molim pomoć - nedjelja ili drugi dan - php Add user to your forum ignore list Reply with quote

Nije mi jasno zašto ovo ne radi. Molim brzu pomoć jer danas je nedjelja pa da mogu testirat skriptu!

$day = date("l");
if ($day == "Sunday")
{
$danas = mktime(0,0,0,date("m"),date("d")+1,date("Y"));
$filof="http://www.hnb.hr/tecajn/f".$danas.".dat";
$fajl=file($filof);
}
else
{
$danas=date("dmy");
$filof="http://www.hnb.hr/tecajn/f".$danas.".dat";
$fajl=file($filof);
}

dakle ako je nedjelja vraća sutrašnji datum, a ako je drugi dan vraća današnji.
Back to top
View user's profile Send private message
che.UP
mi3.crew


Joined: 07 Sep 2003
Posts: 2320
Location: zagreb

PostPosted: 17.03.2008 19:06    Post subject: Re: Molim pomoć - nedjelja ili drugi dan - php Add user to your forum ignore list Reply with quote

vdarlic wrote:
dakle ako je nedjelja vraća sutrašnji datum, a ako je drugi dan vraća današnji.


a kako bi trebao postojati file od sutra ako se jos tecajna lista za njega nije ni definirana?
trebas ici logikom: ako nema danasnjeg - idi na jucer, ako nema jucer - idi na prekjucer... i tako dalje... (npr. bude praznik petak, pa onda nema tecajne 3 dana za redom... bar je tako prije bilo)

_________________
UP | TypeTester | Accommodations App
Meni u Firefox-u ne radi AJAX
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group