note 97925 added to function.chmod
| From: | caparuni at gmail dot com | Date: | Sun, 16 May 2010 08:25:49 +0000 |
| Subject: | note 97925 added to function.chmod | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-169301@lists.php.net to get a copy of this message | ||
if you trying to get permission mode from input form ($_POST or $_GET) please use octdec to convert
the value to octal
<?php
// assuming that user only input 3 digit and still need 0 for prefix.
$mod = '0'.octdec($_POST['mod']);
chmod($file,$mod);
?>
----
Server IP: 202.158.52.162
Probable Submitter: 118.96.195.144
----
Manual Page -- http://www.php.net/manual/en/function.chmod.php
Edit -- https://master.php.net/note/edit/97925
Del: integrated -- https://master.php.net/note/delete/97925/integrated
Del: useless -- https://master.php.net/note/delete/97925/useless
Del: bad code -- https://master.php.net/note/delete/97925/bad+code
Del: spam -- https://master.php.net/note/delete/97925/spam
Del: non-english -- https://master.php.net/note/delete/97925/non-english
Del: in docs -- https://master.php.net/note/delete/97925/in+docs
Del: other reasons-- https://master.php.net/note/delete/97925
Reject -- https://master.php.net/note/reject/97925
Search -- https://master.php.net/manage/user-notes.php