遇到一个非良好的数值 [英] A non well formed numeric value encountered
问题描述
遇到的格式不正确的数值
这是当我使用以下
date(d,$ _ GET ['start_date']);
但是当我使用许多网站建议的 strtotime()我获得了1/1/1970的unix时间戳记日期。
任何想法如何获得正确的日期?
当您安装了PHP 5.2.0或更高版本时,您可能需要检出新的DateTime功能,请查看一些快速介绍的此链接:
http://nl3.php.net/manual/en/datetime.format.php
I have a form that passes two dates (start and finish) to a PHP script that will add those to a DB. I am having problems validating this. I keep getting the following errors
A non well formed numeric value encountered
This is when I use the following
date("d",$_GET['start_date']);
But when I use the strtotime() function as advised by many sites I get a unix timestamp date of 1/1/1970. Any ideas how I can get the correct date?
When you have PHP 5.2.0 or higher installed, you might want to checkout the new DateTime functionalities, take a look at this link for some quick intro's: http://nl3.php.net/manual/en/datetime.format.php
这篇关于遇到一个非良好的数值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!