幫助解決這個錯誤致命錯誤:未捕獲的異常「異常」有消息「日期時間::
Fatal error: Uncaught exception 'Exception' with message 'DateTime::_construct() [datetime.--construct]: Failed to parse time string (--) at position 0 (-): Unexpected character' in Z:\home\plati\www\view.php:110 Stack trace: #0 Z:\home\plati\www\view.php(110): DateTime->_construct('--') #1 {main} thrown in Z:\home\plati\www\view.php on line 110
$newday = $a['dayz'];
$endmonth = $a['monthz'];
$newyear = $a['yearz'];
$date = new DateTime("$newyear-$endmonth-$newday");
$date->modify('+8 day');
$year = $date->format('Y');
$month = $date->format('m');
$day = $date->format('d');
oh yes $ a is empty tyvm – 2012-04-13 12:45:09