note 96086 added to function.chmod
| From: | GeoffW at osu1 dot php dot net | Date: | Mon, 08 Feb 2010 10:13:49 +0000 |
| Subject: | note 96086 added to function.chmod | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-165741@lists.php.net to get a copy of this message | ||
BEWARE using quotes around the second parameter...
If you use quotes eg
chmod (file, "0644");
php will not complain but will do an implicit conversion to an int before running chmod.
Unfortunately the implicit conversion doesn't take into account the octal string so you end up
with an integer version 644, which is 1204 octal
----
Server IP: 69.147.83.197
Probable Submitter: 81.131.91.137
----
Manual Page -- http://www.php.net/manual/en/function.chmod.php
Edit -- https://master.php.net/note/edit/96086
Del: integrated -- https://master.php.net/note/delete/96086/integrated
Del: useless -- https://master.php.net/note/delete/96086/useless
Del: bad code -- https://master.php.net/note/delete/96086/bad+code
Del: spam -- https://master.php.net/note/delete/96086/spam
Del: non-english -- https://master.php.net/note/delete/96086/non-english
Del: in docs -- https://master.php.net/note/delete/96086/in+docs
Del: other reasons-- https://master.php.net/note/delete/96086
Reject -- https://master.php.net/note/reject/96086
Search -- https://master.php.net/manage/user-notes.php