[clug] PHP fileperms()
jamie at jre.id.au
Wed Jan 30 07:43:33 UTC 2019
>From the documentation: "Returns the file's permissions as a numeric
Lower bits of this mode are the same as the permissions expected by chmod(),
however on most platforms the return value will also include information on
type of file given as filename."
It's probably going to be most useful to you to format the lower four bits
this output into an octal representation -- something that looks like 0755.
An example from the documentation shows how to do this:
echo substr(sprintf('%o', fileperms('/tmp')), -4);
There are likely more efficient/others ways to achieve the same lower in
but the above seems the easiest to understand.
On Wed, Jan 30, 2019 at 6:21 PM Bryan Kilgallin via linux <
linux at lists.samba.org> wrote:
> I used this to check two test files: txt and php. The result in both
> cases was "33188". What does this number mean, in terms of file
> linux mailing list
> linux at lists.samba.org
More information about the linux