SeasLog::getDatetimeFormat

(PECL seaslog >=1.0.0)

SeasLog::getDatetimeFormat獲取 SeasLog 日期格式

說明

public static SeasLog::getDatetimeFormat(): string

獲取 SeasLog 日期格式。 使用函數(shù) SeasLog::getDatetimeFormat() 將獲取 php.ini(seaslog.ini) 配置的 seaslog.default_datetime_format 值。

參數(shù)

此函數(shù)沒有參數(shù)。

返回值

獲取 SeasLog 配置中的 seaslog.default_datetime_format 值。 使用函數(shù) SeasLog::setDatetimeFormat() 將改變本函數(shù)的取值。

范例

示例 #1 SeasLog::getDatetimeFormat() example

<?php

var_dump
(SeasLog::getDateTimeFormat());
var_dump(SeasLog::setDateTimeFormat('Ymd His'));
var_dump(SeasLog::getDateTimeFormat());

?>

以上例程的輸出類似于:

string(11) "Y-m-d H:i:s"
bool(true)
string(7) "Ymd His"

參見