Home  >  Article  >  Daily Programming  >  PHP Get the owner name of the current PHP script

PHP Get the owner name of the current PHP script

藏色散人
藏色散人Original
2019-01-19 14:07:575359browse

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.

PHP Get the owner name of the current PHP script

Example of getting the owner name of the current code script:

<?php
echo &#39;当前代码所属: &#39; . get_current_user()."\n";

Output result:

PHP Get the owner name of the current PHP script

##get_current_user —Get the current PHP script owner name

get_current_user ( void ) : string

Return 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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn