file info

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mallu
Forum Newbie
Posts: 9
Joined: Thu Aug 21, 2003 10:32 am

file info

Post by mallu »

Hi there:

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

Thanks
mallu
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

mallu
Forum Newbie
Posts: 9
Joined: Thu Aug 21, 2003 10:32 am

Post 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'];
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

that is probably correct isn't it?

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

then root would be correct
mallu
Forum Newbie
Posts: 9
Joined: Thu Aug 21, 2003 10:32 am

Post 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
Post Reply