note 91794 modified in function.chmod by danbrown
| From: | danbrown@php.net | Date: | Thu, 25 Jun 2009 18:18:15 +0000 |
| Subject: | note 91794 modified in function.chmod by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-157506@lists.php.net to get a copy of this message | ||
if you want to chmod directories too, use this
<?php
$iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($pathname),
RecursiveIteratorIterator::SELF_FIRST);
foreach($iterator as $item) {
chmod($item, $filemode);
}
?>
--was--
if you want to chmod directories too, use this
$iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($pathname),
RecursiveIteratorIterator::SELF_FIRST);
foreach($iterator as $item) {
chmod($item, $filemode);
}
http://php.net/manual/en/function.chmod.php