獲取目前 PHP 指令碼所有者名稱

get_current_user

(PHP 4, PHP 5, PHP 7, PHP 8)

get_current_user獲取目前 PHP 指令碼所有者名稱

說明

get_current_user(): string

返回目前 PHP 指令碼所有者名稱。

返回值

以字串返回使用者名稱。

範例

示例 #1 get_current_user() 例子

<?php
echo 'Current script owner: ' get_current_user();
?>

以上例程的輸出類似於:

Current script owner: SYSTEM

參見

Leave a Reply

Your email address will not be published. Required fields are marked *