uTools-Manuals/docs/php/getlastmod.html
2019-04-08 23:22:26 +08:00

73 lines
4.0 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>获取页面最后修改的时间</title>
</head>
<body class="docs"><div id="layout">
<div id="layout-content"><div id="function.getlastmod" class="refentry">
<div class="refnamediv">
<h1 class="refname">getlastmod</h1>
<p class="verinfo">(PHP 4, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">getlastmod</span> &mdash; <span class="dc-title">获取页面最后修改的时间</span></p>
</div>
<div class="refsect1 description" id="refsect1-function.getlastmod-description">
<h3 class="title">说明</h3>
<div class="methodsynopsis dc-description">
<span class="methodname"><strong>getlastmod</strong></span>
( <span class="methodparam">void</span>
) : <span class="type">int</span></div>
<p class="para rdfs-comment">
获取执行的主脚本的最后修改时间。
</p>
<p class="para">
如果你对其他文件的最后修改时间的感兴趣,可考虑使用 <span class="function"><a href="filemtime.html" class="function">filemtime()</a></span>
</p>
</div>
<div class="refsect1 returnvalues" id="refsect1-function.getlastmod-returnvalues">
<h3 class="title">返回值</h3>
<p class="para">
返回当前页面最后修改的时间。这个值是一个 Unix 时间戳,可以传入 <span class="function"><a href="date.html" class="function">date()</a></span>
错误时返回 <strong><code>FALSE</code></strong>
</p>
</div>
<div class="refsect1 examples" id="refsect1-function.getlastmod-examples">
<h3 class="title">范例</h3>
<p class="para">
<div class="example" id="example-506">
<p><strong>Example #1 <span class="function"><strong>getlastmod()</strong></span> 例子</strong></p>
<div class="example-contents">
<div class="phpcode"><pre><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">//&nbsp;输出类似&nbsp;'Last&nbsp;modified:&nbsp;March&nbsp;04&nbsp;1998&nbsp;20:43:59.'<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"Last&nbsp;modified:&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">date&nbsp;</span><span style="color: #007700">(</span><span style="color: #DD0000">"F&nbsp;d&nbsp;Y&nbsp;H:i:s."</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">getlastmod</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</pre></div>
</div>
</div>
</p>
</div>
<div class="refsect1 seealso" id="refsect1-function.getlastmod-seealso">
<h3 class="title">参见</h3>
<p class="para">
<ul class="simplelist">
<li class="member"><span class="function"><a href="date.html" class="function" rel="rdfs-seeAlso">date()</a> - 格式化一个本地时间/日期</span></li>
<li class="member"><span class="function"><a href="getmyuid.html" class="function" rel="rdfs-seeAlso">getmyuid()</a> - 获取 PHP 脚本所有者的 UID</span></li>
<li class="member"><span class="function"><a href="getmygid.html" class="function" rel="rdfs-seeAlso">getmygid()</a> - 获取当前 PHP 脚本拥有者的 GID</span></li>
<li class="member"><span class="function"><a href="get_current_user.html" class="function" rel="rdfs-seeAlso">get_current_user()</a> - 获取当前 PHP 脚本所有者名称</span></li>
<li class="member"><span class="function"><a href="getmyinode.html" class="function" rel="rdfs-seeAlso">getmyinode()</a> - 获取当前脚本的索引节点inode</span></li>
<li class="member"><span class="function"><a href="getmypid.html" class="function" rel="rdfs-seeAlso">getmypid()</a> - 获取 PHP 进程的 ID</span></li>
<li class="member"><span class="function"><a href="filemtime.html" class="function" rel="rdfs-seeAlso">filemtime()</a> - 取得文件修改时间</span></li>
</ul>
</p>
</div>
</div></div></div></body></html>