PHP Get the owner name of the current PHP script

藏色散人
Release: 2019-08-22 17:56:16
Original
5403 people have browsed it

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";
Copy after login

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
Copy after login
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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template