Home > Article > Daily Programming > PHP Get the owner name of the current PHP script
PHP Gets the owner name of the current PHP script, that is, gets the owner of the current PHP code script. Then what is usually obtained is the name of the local computer system administrator. In PHP we can get it directly through the get_current_user() function.
Example of getting the owner name of the current code script:
<?php echo '当前代码所属: ' . get_current_user()."\n";
Output result:
##get_current_user —Get the current PHP script owner name
get_current_user ( void ) : stringReturn the current PHP script owner name. Return value, returns the user name as a string. This article is about the method of getting the owner name of the current PHP script in PHP. It is simple and easy to understand. I hope it will be helpful to friends in need!
The above is the detailed content of PHP Get the owner name of the current PHP script. For more information, please follow other related articles on the PHP Chinese website!