posix_ttyname() - posix函数(可移植操作系统接口)
posix_ttyname()
(PHP 4, PHP 5, PHP 7)
Determine terminal device name
说明
posix_ttyname(mixed $fd): stringReturns a string for the absolute path to the current terminal device that is open on the file descriptor$fd.
参数
$fdThe file descriptor, which is expected to be either a file resource or an integer. An integer will be assumed to be a file descriptor that can be passed directly to the underlying system call.
In almost all cases, you will want to provide a file resource.
返回值
On success, returns a string of the absolute path of the$fd. On failure, returns FALSE
returns: string(10) "/dev/pts/0" When using pseudo terminal 1 (ie ssh)
鹏仔微信 15129739599 鹏仔QQ344225443 鹏仔前端 pjxi.com 共享博客 sharedbk.com
图片声明:本站部分配图来自网络。本站只作为美观性配图使用,无任何非法侵犯第三方意图,一切解释权归图片著作权方,本站不承担任何责任。如有恶意碰瓷者,必当奉陪到底严惩不贷!