<?php $s='<p>Dziś jest '; switch ($dt) { case 0: { $s.='niedziela'; break; } case 1: { $s.='poniedziałek'; break; } case 2: { $s.='wtorek'; break; } case 3: { $s.='środa'; break; } case 4: { $s.='czwartek'; break; } case 5: { $s.='piątek'; break; } case 6: { $s.='sobota'; break; } default: $s='błąd'; } $s.=", $d "; switch ($m) { case 1: { $s.='stycznia'; break; } case 2: { $s.='lutego'; break; } case 3: { $s.='marca'; break; } case 4: { $s.='kwietnia'; break; } case 5: { $s.='maja'; break; } case 6: { $s.='czerwca'; break; } case 7: { $s.='lipca'; break; } case 8: { $s.='sierpnia'; break; } case 9: { $s.='września'; break; } case 10: { $s.='października'; break; } case 11: { $s.='listopada'; break; } case 12: { $s.='grudnia'; break; } default: $s='błąd'; } $s.=" $r roku.</p>"; ?>
Błedy:
Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Paris' for '1.0/no DST' instead in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\... on line 15 Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Paris' for '1.0/no DST' instead in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\... on line 16 Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Paris' for '1.0/no DST' instead in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\... on line 17 Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Paris' for '1.0/no DST' instead in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\... on line 18