当前位置: 首页>>代码示例>>PHP>>正文


PHP Time::date方法代码示例

本文整理汇总了PHP中Time::date方法的典型用法代码示例。如果您正苦于以下问题:PHP Time::date方法的具体用法?PHP Time::date怎么用?PHP Time::date使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Time的用法示例。


在下文中一共展示了Time::date方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

<?php

use traq\helpers\Atom;
// Entries
$entries = array();
foreach ($tickets as $ticket) {
    $entries[] = array('title' => $ticket->summary, 'id' => "tickets:{$ticket->ticket_id}", 'updated' => Time::date("c", $ticket->created_at), 'link' => "http://" . $_SERVER['HTTP_HOST'] . Request::base($ticket->href()), 'author' => array('name' => $ticket->user->name), 'content' => array('type' => "XHTML", 'data' => $ticket->body));
}
// Make feed
$feed = new Atom(array('title' => l('x_ticket_feed', $project->name), 'link' => "http://" . $_SERVER['HTTP_HOST'] . Request::base(), 'feed_link' => "http://" . $_SERVER['HTTP_HOST'] . Request::requestUri(), 'updated' => $entries[0]['updated'], 'entries' => $entries));
// Output feed
header("Content-type: text/plain");
print $feed->build();
开发者ID:dasklney,项目名称:traq,代码行数:13,代码来源:index.atom.php

示例2:

<div class="right w500">

	<?php 
echo Message::render();
?>
	
	<h3>Title: <?php 
echo $message->title;
?>
</h3>
	<p>From: <?php 
echo $message->from->username;
?>
</p>
	
	<p>Content: <?php 
echo $message->message;
?>
</p>

	<p>Date: <?php 
echo Time::date($m->created);
?>
</p>
	
	<p><?php 
echo html::anchor('message/delete/' . $message->id, 'Delete');
?>
</p>
</div>
开发者ID:joffuk,项目名称:modulargaming,代码行数:30,代码来源:view.php

示例3: foreach

	<p>You do not have a character yet, <?php 
    echo html::anchor('character', 'create one?');
    ?>
.</p>
	
	<?php 
}
?>
</div>

<div class="right">
	<h2>History</h2>
	<ul class="no-bullets history">
		<?php 
foreach ($history as $h) {
    ?>
		
		<li><span><?php 
    echo Time::date($h->time, NULL);
    ?>
:</span> <?php 
    echo $h->history;
    ?>
 </li>
		
		<?php 
}
?>
	</ul>
</div>
开发者ID:joffuk,项目名称:modulargaming,代码行数:30,代码来源:index.php


注:本文中的Time::date方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。