[PHP] Can figure out whats wrong

2005-11-03 Thread Anders Gjermshus
I have I strange problem /bug in my function and I hoping someone can tell
me whats wrong.

This function return the timestamp for midnight Monday on the given week
number.

Its working fine, but on week 44 and week 45 it misses with 3600 seconds (1
hour)

I wounder if it's a bug in strtotime() or it something I'm doing, it only
week 44 and 45.

 

I hope someone can give me an answer on this problem.

 

function week2Timestamp ($weekno)

{

$first_day_of_year = date('w', mktime(0,0,0,1,1, date('Y')));

if ($first_day_of_year == 0)

{

$first_day_of_year = 7;

}



$day = ($weekno -1) * 7 + 1 - $first_day_of_year;

$timestamp = strtotime('next Monday', mktime(0, 0, 0, 1, $day,
date('Y')));



return $timestamp;

}

 

- Anders



[PHP] phps and iis

2004-02-14 Thread Anders Gjermshus
Hi.

 

Is it possible to get IIS 6 to show php sources. ( phps files )

And how do I do that, I have not found anything about it on php.net or
www.google.com http://www.google.com/ 

 

Regards

anders

 



SV: [PHP] Re: phps and iis

2004-02-14 Thread Anders Gjermshus
I'm using Windows 2003 server with IIS 6
I have installed php using isap not cgi.

I really need this to work :) 

- anders

-Opprinnelig melding-
Fra: Jason Lewis [mailto:[EMAIL PROTECTED] 
Sendt: 14. februar 2004 19:04
Til: [EMAIL PROTECTED]
Emne: [PHP] Re: phps and iis

Yes you just have to set the filetype in the filetype associations in IIS 6,
are you using SBS2003?


Jason Lewis


Anders Gjermshus [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi.



 Is it possible to get IIS 6 to show php sources. ( phps files )

 And how do I do that, I have not found anything about it on php.net or
 www.google.com http://www.google.com/



 Regards

 anders





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



SV: [PHP] Re: phps and iis

2004-02-14 Thread Anders Gjermshus
I have installed php on my iis server. What I'm looking for is how to get
php sources to work on IIS. Like phps files.

-Opprinnelig melding-
Fra: zerof [mailto:[EMAIL PROTECTED] 
Sendt: 14. februar 2004 21:41
Til: [EMAIL PROTECTED]
Emne: [PHP] Re: phps and iis

It is possible:
http://www.macromedia.com/devnet/mx/dreamweaver/articles/php_iis.html
-
zerof
-
Anders Gjermshus [EMAIL PROTECTED] escreveu na mensagem
news:[EMAIL PROTECTED]
 Is it possible to get IIS 6 to show php sources. ( phps files )
---

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



SV: [PHP] amp

2004-01-28 Thread Anders Gjermshus
Htmlspecialchars() should do it :)
http://www.php.net/manual/en/function.htmlspecialchars.php

- anders


-Opprinnelig melding-
Fra: Diana Castillo [mailto:[EMAIL PROTECTED] 
Sendt: 28. januar 2004 15:27
Til: [EMAIL PROTECTED]
Emne: [PHP] amp

is there any function that will always replace a  with a amp in a
string?

--
--
Diana Castillo
Global Reservas, S.L.
C/Granvia 22 dcdo 4-dcha
28013 Madrid-Spain
Tel : 00-34-913604039
Fax : 00-34-915228673
email: [EMAIL PROTECTED]
Web : http://www.hotelkey.com
  http://www.destinia.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php