This website uses cookies to improve user experience. By using our website you consent to all cookies in accordance with our Cookie Policy.
FAQ

We provide webhosting for thousands of domains.
Transfer your domains to us and join our satisfied customers.

Domains from 5,99€. Renewal for the same price.

Support

FAQ

Others

HOTLINE  
+421 221 028 430
E-MAIL support
support@exohosting.com
ICQ support
213 057 503
ONLINE support

Mo-Fr: 08:00-20:00
Sa-Su: 10:00-18:00

Economy

Mo-Fr: 08:00-16:30

Free transfer of .sk domain

If you transfer your domain to us, we pay transfer fee for you.

How to recursively edit file attributes?

seen: 1405 | Date added: 05.09.2010 | rating:
"

function chmod_R($path, $filemode) {
if (!is_dir($path))
return chmod($path, $filemode);

$dh = opendir($path);
while ($file = readdir($dh)) {
if($file != '.' && $file != '..') {
$fullpath = $path.'/'.$file;
if(!is_dir($fullpath)) {
if (!chmod($fullpath, $filemode))
return FALSE;
} else {
if (!chmod_R($fullpath, $filemode))
return FALSE;
}
}
}

closedir($dh);

if(chmod($path, $filemode))
return TRUE;
else
return FALSE;
}

To use this function make sure you have turned off safe_mode in your PHP settings. This function only relates to files/directories created by php.

"
Was this article helpful?
no
Hodnotenie 2.74/5 (633 hlasov)
yes

Related topics