當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Time::display方法代碼示例

本文整理匯總了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 
}
?>
-->
開發者ID:rebekahheacock,項目名稱:dwa15-archive,代碼行數:30,代碼來源:v_posts_delete.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 "&nbsp;&nbsp;No outgoing emails";
    }
    if (REMOTE_DB) {
        echo "&nbsp;&nbsp;<span style='color:red; font-weight:bold'>LIVE DB</span> ";
    } else {
        echo "&nbsp;&nbsp;Local DB;";
    }
    echo "</div>";
}
開發者ID:rebekahheacock,項目名稱:dwa15-archive,代碼行數:18,代碼來源:environment-details.php

示例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);
 }
開發者ID:rebekahheacock,項目名稱:dwa15-archive,代碼行數:11,代碼來源:c_practice.php


注:本文中的Time::display方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。