Page 1 of 1

file info

Posted: Tue Aug 26, 2003 1:29 pm
by mallu
Hi there:

How do i get the last modified date and the owner of a selected file..?

Thanks
mallu

Posted: Tue Aug 26, 2003 1:51 pm
by JayBird

Posted: Wed Aug 27, 2003 2:51 pm
by mallu
$fileowner is alwys giving me root

Thanks for your help

mallu

Code: Select all

$startscript = $froot.$fdir.$ffile;
$fileowneruid=fileowner($startscript);
$fileownerarray=posix_getpwuid($fileownerid);
$fileowner=$fileownerarrayї'name'];

Posted: Thu Aug 28, 2003 3:18 am
by JayBird
that is probably correct isn't it?

you running on localhost? did you put the files there?

then root would be correct

Posted: Thu Aug 28, 2003 9:22 am
by mallu
When I do ls - l it gives give me lgranito as the owner of the file rather than the root. The $startscript variable is the path to this file. I was expecting the variable $fileowner to output lgranito. Could u please let me know what I am doing wrong here...

thanks

Mallu