<!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>Gets time of last page modification</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.getenv.html">getenv</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.getmygid.html">getmygid</a></div> <div class="up"><a href="ref.info.html">PHP Options/Info Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="function.getlastmod" class="refentry"> <div class="refnamediv"> <h1 class="refname">getlastmod</h1> <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">getlastmod</span> — <span class="dc-title">Gets time of last page modification</span></p> </div> <div class="refsect1 description" id="refsect1-function.getlastmod-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">int</span> <span class="methodname"><strong>getlastmod</strong></span> ( <span class="methodparam">void</span> )</div> <p class="para rdfs-comment"> Gets the time of the last modification of the main script of execution. </p> <p class="para"> If you're interested in getting the last modification time of a different file, consider using <span class="function"><a href="function.filemtime.html" class="function">filemtime()</a></span>. </p> </div> <div class="refsect1 returnvalues" id="refsect1-function.getlastmod-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns the time of the last modification of the current page. The value returned is a Unix timestamp, suitable for feeding to <span class="function"><a href="function.date.html" class="function">date()</a></span>. Returns <strong><code>FALSE</code></strong> on error. </p> </div> <div class="refsect1 examples" id="refsect1-function.getlastmod-examples"> <h3 class="title">Examples</h3> <p class="para"> <div class="example" id="example-494"> <p><strong>Example #1 <span class="function"><strong>getlastmod()</strong></span> example</strong></p> <div class="example-contents"> <div class="phpcode"><code><span style="color: #000000"> <span style="color: #0000BB"><?php<br /></span><span style="color: #FF8000">// outputs e.g. '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> </code></div> </div> </div> </p> </div> <div class="refsect1 seealso" id="refsect1-function.getlastmod-seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"> <span class="function"><a href="function.date.html" class="function" rel="rdfs-seeAlso">date()</a> - Format a local time/date</span></li> <li class="member"> <span class="function"><a href="function.getmyuid.html" class="function" rel="rdfs-seeAlso">getmyuid()</a> - Gets PHP script owner's UID</span></li> <li class="member"> <span class="function"><a href="function.getmygid.html" class="function" rel="rdfs-seeAlso">getmygid()</a> - Get PHP script owner's GID</span></li> <li class="member"> <span class="function"><a href="function.get-current-user.html" class="function" rel="rdfs-seeAlso">get_current_user()</a> - Gets the name of the owner of the current PHP script</span></li> <li class="member"> <span class="function"><a href="function.getmyinode.html" class="function" rel="rdfs-seeAlso">getmyinode()</a> - Gets the inode of the current script</span></li> <li class="member"> <span class="function"><a href="function.getmypid.html" class="function" rel="rdfs-seeAlso">getmypid()</a> - Gets PHP's process ID</span></li> <li class="member"> <span class="function"><a href="function.filemtime.html" class="function" rel="rdfs-seeAlso">filemtime()</a> - Gets file modification time</span></li> </ul> </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.getenv.html">getenv</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.getmygid.html">getmygid</a></div> <div class="up"><a href="ref.info.html">PHP Options/Info Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>