I get the following warning on all my coding using 'strftime':
"Warning: Invalid CRT parameters detected in C:\Users\chuck\Desktop\Documents\php\xampp\htdocs\ php24\employee.php on line 56"
Warning: Invalid CRT parameters detected in C:\Users\chuck\Desktop\Documents\php\xampp\htdocs\ php24\employee.php on line 59
Warning: Invalid CRT parameters detected in C:\Users\chuck\Desktop\Documents\php\xampp\htdocs\ php24\employee.php on line 60
There are five (5) identical Warning msgs for each line.
I created the following code:
Code:
<?php
line 56 echo '<p>Original date/time: ' . strftime('%A, %B %e, %Y %I:%M%p %Z') . '</p>';
line 57 echo '<p>New date/time in different formats: </p>';
line 58 echo strftime('%c', $myTime) . '<br />';
line 59 echo strftime('%m/%e/%Y', $myTime) . '<br />';
line 60 echo strftime('%A, %B %e, %Y', $myTime) . '<br />';
line 61 echo strftime('%A %I:%M%p %Z', $myTime) . '<br />';
line 62 echo strftime('%I:%M %p', $myTime) . '<br />';
?>
I get the Warning listed above on lines 56, 59 and 60. The other lines of coding is processed.
I downloaded the following code from wrox.com:
Code:
<?php
line 56 echo '<p>Original date/time: ' . strftime('%A, %B %e, %Y %I:%M%p %Z') . '</p>';
echo '<p>New date/time in different formats: </p>';
echo strftime('%c', $myTime) . '<br />';
line 59 echo strftime('%m/%e/%Y', $myTime) . '<br />';
line 60 echo strftime('%A, %B %e, %Y', $myTime) . '<br />';
echo strftime('%A %I:%M%p %Z', $myTime) . '<br />';
echo strftime('%I:%M %p', $myTime) . '<br />';
?>
I have defined $myTime at the top of the coding. It is defined as:
Code:
$myTime = time()+ (60 * 60 * 24 * 7);
The coding is the same for my entries and what I down loaded from WROX. The same lines of coding had the WARNING error.
What is wrong?