note 43964 modified in function.fileperms by aidan
| From: | aidan@php.net | Date: | Sun, 11 Jul 2004 04:18:52 +0000 |
| Subject: | note 43964 modified in function.fileperms by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-73038@lists.php.net to get a copy of this message | ||
If you're just wanting to get the full perms of a file/folder in octal format, use:
<?php
echo substr(sprintf("%o", fileperms( "/tmp" )), -4);
?>
Under (most) Linux systems, this will produce a result of: 1777
--was--
If you're just wanting to get the full perms of a file/folder in octal format, the following
nicely summarizes a few of the other notes below:
<?php
echo substr( sprintf( "%o", fileperms( "/tmp" ) ), -4 );
?>
Under (most) Linux systems, this will produce a result of: 1777
http://php.net/manual/en/function.fileperms.php