note 56077 added to function.chmod
| From: | memp at osu1 dot php dot net | Date: | Mon, 22 Aug 2005 22:04:11 +0000 |
| Subject: | note 56077 added to function.chmod | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-94051@lists.php.net to get a copy of this message | ||
If you are storing your mode in a variable like
$mode = 0755;
you will run into the inevitable octal mode problem. An easy way around that is to use the octdec()
function.
chmod("some_filename.ext", octdec($mode));
----
Manual Page -- http://www.php.net/manual/en/function.chmod.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+56077
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+56077&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+56077&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+56077&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+56077&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+56077&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+56077&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+56077&report=yes
Search -- http://master.php.net/manage/user-notes.php