tp5.0.21 model底层的Bug(待确认)

浏览:351 发布日期:2018/10/13 分类:ThinkPHP5专区 关键字: tp5 底层 时间戳
/**
* 时间日期字段格式化处理
* @access public
* @param mixed $time 时间日期表达式
* @param mixed $format 日期格式
* @param bool $timestamp 是否进行时间戳转换
* @return mixed
*/
protected function formatDateTime($time, $format, $timestamp = false)
{
if (false !== strpos($format, '\\')) {
$time = new $format($time);
} elseif (!$timestamp && false !== $format) {
$time = date($format, $time);
}
return $time;
}

elseif后面的!应该去掉
最佳答案
评论( 相关
后面还有条评论,点击查看>>