Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <h1>Start test</h1>
- <hr>
- <?php
- permitted($_SERVER['DOCUMENT_ROOT']);
- function permitted($dir) {
- foreach (scandir($dir) as $file) {
- if (substr($file, 0, 1) !== '.') {
- if (is_writable($file)) {
- print $file.' [PERMS: '.fileperms($file).']<br />';
- } else {
- print '<span style="color:red;">'.$file.'</span><br />';
- }
- if (is_dir($file)) {
- print '<h4>DIR:'.$file.'</h4><div style="margin:0 0 12px 12px;">';
- permitted($file);
- print '</div>';
- }
- }
- }
- }
- ?>
- <hr>
- <h1>The end</h1>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement