Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何获取mysql注入的当前wordpress时间戳_Wordpress_Timestamp - Fatal编程技术网

如何获取mysql注入的当前wordpress时间戳

如何获取mysql注入的当前wordpress时间戳,wordpress,timestamp,Wordpress,Timestamp,我需要获取wordpress设置区域内设置的时间的当前时间戳?如何获取mySQL注入的时间戳?如果您需要获取格式化选项本身,请参阅WordPress答案 如果希望使用这些选项值获取当前时间(如前一链接所述),可以使用标准PHPdate函数: // Get the timestamp format settings. $date_format = get_option( "date_format" ); $time_format = get_option( "time_format" ); //

我需要获取wordpress设置区域内设置的时间的当前时间戳?如何获取mySQL注入的时间戳?

如果您需要获取格式化选项本身,请参阅WordPress答案

如果希望使用这些选项值获取当前时间(如前一链接所述),可以使用标准PHP
date
函数:

// Get the timestamp format settings.
$date_format = get_option( "date_format" );
$time_format = get_option( "time_format" );

// Get a date using the timestamp formats.
$current_date = date( $date_format . " " . $time_format );
$current_date
应将脚本运行时日期和时间保存为字符串,其格式如WordPress设置中定义的


如果需要调整时区,则需要将其中一个附加到
date
函数的format参数。

我不知道您在说什么。你能详细说明一下吗?或者,你在谷歌上搜索过wordpress获取时间吗?你的问题的答案很可能是完美的,我发现通过添加date_i18n而不是date,wordpress将获得当前的本地时间,这正是我想要的。现在是问题的最后一部分,如何将其转换为时间戳?您指的是标准格式的时间戳(例如UNIX时间戳或某个其他构造)?我将考虑从日期字符串创建一个字符串,并使用它来输出或生成适当的格式。