本文整理汇总了PHP中Time::display方法的典型用法代码示例。如果您正苦于以下问题:PHP Time::display方法的具体用法?PHP Time::display怎么用?PHP Time::display使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Time
的用法示例。
在下文中一共展示了Time::display方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<!--print_r($posts); -->
<?php
echo $post['content'];
?>
<form action="/posts/p_delete/<?php
echo $post['post_id'];
?>
" method="post">
<input type="submit" name="delete" value="<?php
echo $post['post_id'];
?>
"/>
</form>
<?php
echo Time::display($post['created'], 'Y-m-d G:i');
?>
<?php
echo $post['first_name'];
?>
<?php
echo $post['content'];
?>
<?php
}
?>
-->
示例2:
<?php
# Report information about our environment
if (!IN_PRODUCTION && !Utils::is_ajax()) {
echo "<div onClick='this.style.display = \"none\";' style='cursor:pointer; position:fixed; z-index:999; background-color:yellow; padding:3px; bottom:0px; left:0px;'>";
echo Time::display(Time::now());
if (ENABLE_OUTGOING_EMAIL) {
echo "OUTGOING EMAILS ENABLED";
} else {
echo " No outgoing emails";
}
if (REMOTE_DB) {
echo " <span style='color:red; font-weight:bold'>LIVE DB</span> ";
} else {
echo " Local DB;";
}
echo "</div>";
}
示例3: test_time
public function test_time()
{
$full_moon = 1326119760;
# Jan 9, 2012 07:30 GMT
# Shows the time in your app's timezone
echo "<br>App TZ: " . Time::display($full_moon);
# Hard code in the timezone you want to display
echo "<br>Los Angeles TZ: " . Time::display($full_moon, '', 'America/Los_Angeles');
# Or, assuming you know your user's timezone, pass it in as a variable
//echo "<br>User's TZ: ".Time::display($full_moon, '', $this->user->timezone);
}