/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?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);?>