Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //path to directory to scan
- $directory = "/";
- //get all files in specified directory
- $files = glob($directory . "*");
- //print each file name
- foreach($files as $file)
- {
- //check to see if the file is a folder/directory
- if(is_dir($file))
- {
- // 0777 read write execute for all user + owner
- chmod("$file",0777);
- echo $file."<br></br>";
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement