note 41686 deleted from function.chmod by betz
| From: | betz@php.net | Date: | Mon, 19 Apr 2004 21:29:09 +0000 |
| Subject: | note 41686 deleted from function.chmod by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-68345@lists.php.net to get a copy of this message | ||
Note Submitter: kumar mcmillan
----
this may be obvious to someone else but took me some head scratching to figure out...
passing a mode as a string to chmod will not work, even if you convert to integer. for example:
<?php
$mode = '0777';
chmod($file, (int) $mode); // error! inappropriate file type or format
?>
it must be :
<?php
$mode = 0777;
chmod($file, $mode);
?>