note 32456 modified in function.posix-getpwuid by vincent

From: Date: Wed, 05 Nov 2003 19:21:59 +0000
Subject: note 32456 modified in function.posix-getpwuid by vincent
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-59958@lists.php.net to get a copy of this message
To get the name of the owner of a file you can use something like this: <?php $startscript="/var/log/hello.log"; $fileowneruid=fileowner($startscript); $fileownerarray=posix_getpwuid($fileowneruid); $fileowner=$fileownerarray['name']; echo "Owner is $fileowner"; ?> (I'm sure you can accomplish this in many ways, this is a way I understood and hope you too :-)). Rolf --was-- To get the name of the owner of a file you can use something like this: <?php $startscript="/var/log/hello.log"; $fileowneruid=fileowner($startscript); $fileownerarray=posix_getpwuid($fileownerid); $fileowner=$fileownerarray['name']; echo "Owner is $fileowner"; ?> (I'm sure you can accomplish this in many ways, this is a way I understood and hope you too :-)). Rolf http://www.php.net/manual/en/function.posix-getpwuid.php

« previous php.notes (#59958) next »