/ Published in: PHP
I use it when i've problems with permissions of user-uploaded files.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php function chmod_R($path, $filemode) { if($file != '.' && $file != '..') { $fullpath = $path.'/'.$file; echo 'chmod ' .$filemode.' '.$fullpath. "<br />"; echo '<br />'; chmod_R($fullpath, $filemode); } } } } chmod_R('.', 0755); ?>
URL: recursive-chmod-php