Jump to content

Chmod


forumnz

Recommended Posts

This code should work although not tested

<?php
$dir = "/etc/php5/";

// Open a known directory, and proceed to read its contents
if (is_dir($dir)) {
    if ($dh = opendir($dir)) {
        while (($file = readdir($dh)) !== false) {
            if(getimegesize($dir . $file))
             {
               chmod($dir.$file, 0744);
             }
        }
        closedir($dh);
    }
}
?>

Link to comment
https://forums.phpfreaks.com/topic/51031-chmod/#findComment-251133
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.