Why I am running into problems with a PHP Date function on IIS? -


i developing php website trying test on iis hosting have (on sub domain of original website classic asp)

the whole page falls down after third line in next snippet:

$datestring= requestqs("year") . '-' . $monthnumber . '-01 first day of next month'; $dt=date_create($datestring); $nextmonth = $dt->format('y-m-d'); 

fatal error: call member function format() on non-object in

the php version 5.2.17 date stuff should work right?

it's working fine on wamp install.

any clues?

well, trying convert $datestring in wrong way.

try this:

$dateformat =requestqs("year") . '-' . $monthnumber . '-01'; $datestring = $dateformat.'first day of next month';  $dt = datetime::createfromformat('y-m-d', $dateformat );  $nextmonth = $dt->format('y-m-d'); 

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -