note 28280 added to function.fileperms
| From: | chmod at rack1 dot php dot net | Date: | Wed, 08 Jan 2003 09:03:06 +0000 |
| Subject: | note 28280 added to function.fileperms | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-41817@lists.php.net to get a copy of this message | ||
In response to rij73 dot com
In order to use with both files and directories, I had to change the last line following code -
//return permissions in the normal format
$decperms = fileperms($file);
$octalperms = sprintf("%o",$decperms);
$perms=(substr($octalperms,3));
to
$perms=(substr($octalperms,-3));
--
http://www.php.net/manual/en/function.fileperms.php
http://master.php.net/manage/user-notes.php?action=edit+28280
http://master.php.net/manage/user-notes.php?action=delete+28280
http://master.php.net/manage/user-notes.php?action=reject+28280