GonzoTheHorrible
10-29-2001, 03:17 AM
Hello all. line 2 sets the file I want to get permission of. line 3 returns the uid of the fileowner.
//Trouble starts//
line 4 returns an asscoiative array w/ info about user referenced by uid. LINE 5 WOULD LIKE TO RETURN THE HUMAN READABLE NAME OF THIS USER.
// Trouble ends //
// Understanding ARRAYS
$file="/home/jason/ftp.php";
$uid = fileowner( $file );
$humanuid = posix_getpwuid( $uid );
$humanuid[NAME] = $name;
echo "$name\n";
echo "$uid\n";
The Output is:
X-Powered-By: PHP/4.0.6
Content-type: text/html
501
The PHP manual has a table of "user info elements" so I'm guessing that saying $humanuid[NAME] = $name
would return the users name funny enough. However it isn't. Could anyone tell me what I'm missing or not understanding or point me in the right direction??? Any help would be much appriech.Thanks in advance.
//Trouble starts//
line 4 returns an asscoiative array w/ info about user referenced by uid. LINE 5 WOULD LIKE TO RETURN THE HUMAN READABLE NAME OF THIS USER.
// Trouble ends //
// Understanding ARRAYS
$file="/home/jason/ftp.php";
$uid = fileowner( $file );
$humanuid = posix_getpwuid( $uid );
$humanuid[NAME] = $name;
echo "$name\n";
echo "$uid\n";
The Output is:
X-Powered-By: PHP/4.0.6
Content-type: text/html
501
The PHP manual has a table of "user info elements" so I'm guessing that saying $humanuid[NAME] = $name
would return the users name funny enough. However it isn't. Could anyone tell me what I'm missing or not understanding or point me in the right direction??? Any help would be much appriech.Thanks in advance.