note 93180 deleted from function.fileperms by danbrown

From: Date: Thu, 27 Aug 2009 16:31:18 +0000
Subject: note 93180 deleted from function.fileperms by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-159932@lists.php.net to get a copy of this message
Note Submitter: meecrob at k42b3 dot com Reason: useless ---- There seems a little bit confusion on the last two post about how to display the fileperms like 666 or 0666. When you have a file fileperms() returns i.e. 100666 <?php substr(decoct(fileperms('foo.txt')), 3); # 666 substr(decoct(fileperms('foo.txt')), 2); # 0666 ?> if you have a dir fileperms() returns i.e. 40777 <?php substr(decoct(fileperms('.')), 2); # 777 substr(decoct(fileperms('.')), 1); # 0777 ?> So both are right. Note I have currently tested this on an windows box so I dont know how the function behave under a different OS.

« previous php.notes (#159932) next »