Return to Snippet

Revision: 25021
at March 18, 2010 03:58 by Wiederkehr


Initial Code
<?phpfunction chmod_R($path, $filemode) {$dh = opendir($path);while ($file = readdir($dh)) {if($file != '.' && $file != '..') {$fullpath = $path.'/'.$file;echo 'chmod ' .$filemode.' '.$fullpath. "<br />";chmod($fullpath, $filemode);echo '<br />';if(is_dir($fullpath)) {chmod_R($fullpath, $filemode);} }}closedir($dh);}chmod_R('.', 0777);?>

Initial URL

                                

Initial Description

                                

Initial Title
Recursive CHMOD with PHP

Initial Tags

                                

Initial Language
PHP