Fatal error: Uncaught exception 'Exception' with message 'DateTime::_construct() [datetime.--construct]: Failed to parse time string (Resource id #7) at position 0 (R): The timezone could not be found in the database' in Z:\home\plati\www\view.php:21 Stack trace: #0 Z:\home\plati\www\view.php(21): DateTime->_construct('Resource id #7') #1 {main} thrown in Z:\home\plati\www\view.php on line 21致命错误:未捕获的异常“异常”与消息“日期时间:: __构建体()[<a href='datetime.--construct'>datetime.--c
have ithis error what do? line 20...
$date = mysql_query("SELECT date FROM sondaje WHERE id = '$id'") or die("Error! DataBase Name Incorrect!");
$bdate = new DateTime("$date");
$bdate->modify('+8 day');
$yearz = $bdate->format('Y');
$monthz = $bdate->format('m');
$dayz = $bdate->format('d');
$hourz = $bdate->format('H');
$minutz = $bdate->format('i');
$secndz = $bdate->format('s');
这是一个家庭作业?? – diEcho 2012-04-25 11:35:26
对不起,堆栈溢出不是阅读手册的方便选择。有很多关于如何使用(过时的)mysql扩展的例子。 – 2012-04-25 11:38:42