本文整理匯總了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);
}