php系统函数

本文介绍了PHP中用于获取当前脚本基本信息的一系列内置函数,包括获取脚本所有者名称、进程ID、组ID、用户ID、最后修改时间和inode等。通过这些函数,开发者可以更好地了解和控制脚本运行的环境。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

get_current_user() (PHP 4, PHP 5)
get_current_user: Gets the name of the owner of the current PHP script

int getmypid ( void ) Gets the current PHP process ID.
Returns the current PHP process ID, or FALSE on error.

int getmygid ( void )
Gets the group ID of the current script.
Returns the group ID of the current script, or FALSE on error.

int getmyuid ( void )
Gets the user ID of the current script.
Returns the user ID of the current script, or FALSE on error.

 int getlastmod ( void )
Gets the time of the last modification of the current page.
If you're interested in getting the last modification time of a different file, consider using filemtime().
Returns the time of the last modification of the current page. The value returned is a Unix timestamp, suitable for feeding to date(). Returns FALSE on error.
<?php
// outputs e.g. 'Last modified: March 04 1998 20:43:59.'
echo "Last modified: " . date ("F d Y H:i:s.", getlastmod());
?>

 int getmyinode ( void )
Gets the inode of the current script.

Returns the current script's inode as an integer, or FALSE on error.

out put example

current_user = more
pid=18157
uid=527
mod_time = 1348046530
inode = 10622040

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值