【发布时间】:2011-08-08 16:43:41
【问题描述】:
我正在尝试在 php 中构建一个函数,它需要用户输入日期,该日期可以是过去 20 年内的任何日期。我尝试使用 php 中的 getdate() 函数在星期几返回给他们。 这是我所拥有的不起作用的东西。
$date="8/4/2010";//user input
$dateget=getdate($date);
echo $dateget; // i want an output like "monday" or "saturday"
当我运行这段代码时,我得到了这个错误
A non well formed numeric value encountered (on the $dateget=getdate($date) line)
谢谢
【问题讨论】: