<!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 the name of the owner of the current PHP script</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.get-cfg-var.html">get_cfg_var</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.get-defined-constants.html">get_defined_constants</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.get-current-user" class="refentry"> <div class="refnamediv"> <h1 class="refname">get_current_user</h1> <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">get_current_user</span> — <span class="dc-title">Gets the name of the owner of the current PHP script</span></p> </div> <div class="refsect1 description" id="refsect1-function.get-current-user-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">string</span> <span class="methodname"><strong>get_current_user</strong></span> ( <span class="methodparam">void</span> )</div> <p class="simpara"> Returns the name of the owner of the current PHP script. </p> </div> <div class="refsect1 returnvalues" id="refsect1-function.get-current-user-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns the username as a string. </p> </div> <div class="refsect1 examples" id="refsect1-function.get-current-user-examples"> <h3 class="title">Examples</h3> <p class="para"> <div class="example" id="example-485"> <p><strong>Example #1 <span class="function"><strong>get_current_user()</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: #007700">echo </span><span style="color: #DD0000">'Current script owner: ' </span><span style="color: #007700">. </span><span style="color: #0000BB">get_current_user</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">?></span> </span> </code></div> </div> <div class="example-contents"><p>The above example will output something similar to:</p></div> <div class="example-contents screen"> <div class="cdata"><pre> Current script owner: SYSTEM </pre></div> </div> </div> </p> </div> <div class="refsect1 seealso" id="refsect1-function.get-current-user-seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <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.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.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.getlastmod.html" class="function" rel="rdfs-seeAlso">getlastmod()</a> - Gets time of last page modification</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.get-cfg-var.html">get_cfg_var</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.get-defined-constants.html">get_defined_constants</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>