note 98337 added to function.fileperms
| From: | info at dark-cms dot de | Date: | Wed, 09 Jun 2010 19:23:34 +0000 |
| Subject: | note 98337 added to function.fileperms | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-169993@lists.php.net to get a copy of this message | ||
the right way should be
$path = 'path_to_dir_or_file';
$chmod = fileperms($path);
if($chmod)
{
$chmod = decoct($chmod);
echo substr($chmod, strlen($chmod) - 4);
}
or in one line
echo substr(decoct(fileperms('.')),strlen(decoct(fileperms('.')))-4);
----
Server IP: 85.214.154.209
Probable Submitter: 93.215.150.180
----
Manual Page -- http://www.php.net/manual/en/function.fileperms.php
Edit -- https://master.php.net/note/edit/98337
Del: integrated -- https://master.php.net/note/delete/98337/integrated
Del: useless -- https://master.php.net/note/delete/98337/useless
Del: bad code -- https://master.php.net/note/delete/98337/bad+code
Del: spam -- https://master.php.net/note/delete/98337/spam
Del: non-english -- https://master.php.net/note/delete/98337/non-english
Del: in docs -- https://master.php.net/note/delete/98337/in+docs
Del: other reasons-- https://master.php.net/note/delete/98337
Reject -- https://master.php.net/note/reject/98337
Search -- https://master.php.net/manage/user-notes.php