hi is there a way to return the file mode of a file (eg. 755,644,etc)? I only found one function relates to file mode, and it's chmod(). but this only changes it doesn't return the file mode.
thx
[man]fileperms[/man]
and to get that number to proper decimal base 10 format that you would use to chmod, you can use this:
<?php $file = "test.txt"; clearstatcache(); $chmod = substr(base_convert(fileperms($file), 10, 8), -3); echo $chmod; ?>
Thanks for the replies.....