mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-17 21:16:57 +08:00
73 lines
4.0 KiB
HTML
73 lines
4.0 KiB
HTML
<!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> — <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"><?php<br /></span><span style="color: #FF8000">// 输出类似 'Last modified: March 04 1998 20:43:59.'<br /></span><span style="color: #007700">echo </span><span style="color: #DD0000">"Last modified: " </span><span style="color: #007700">. </span><span style="color: #0000BB">date </span><span style="color: #007700">(</span><span style="color: #DD0000">"F d Y H:i:s."</span><span style="color: #007700">, </span><span style="color: #0000BB">getlastmod</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">?></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> |