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

被折叠的 条评论
为什么被折叠?



