WebsiteBaker 2.13.8 is now available!
R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WBhttps://forum.websitebaker.org/index.php/topic,32355.0.html
function check_dir($path) { echo "<h1>checking: ".$path."</h1>"; $dh = opendir($path); while (($file = readdir($dh)) !== false) { if ($file<>'.' && $file<>'..') { if (is_dir($path.'/'.$file)) { check_dir($path.'/'.$file); } else { if (is_writable($path.'/'.$file)) { echo 'Green :'.$file.'<br>'; } else { echo '#### Not ok! :'.$file.'<br>'; } } } } closedir($dh);}check_dir('../temp');check_dir('../templates');check_dir('../pages');check_dir('../languages');check_dir('../media');
If you use it on a HTML Page you need to wrap ....
$path = '../'; // first level page with codecheck_dir($path.'temp');check_dir($path.'templates');check_dir($path.'pages'); // default pages dir!check_dir($path.'languages');check_dir($path.'media');
Many servers can't handle php inside html pages
This script will only work at a defualt installation (the pages dir for example) and only when the code is put in a firstlevel page
echo "<h1>Checking permissions</h1>";function check_dir($path) { echo "<h4>".$path."</h1>"; $dh = opendir($path); while (($file = readdir($dh)) !== false) { if ($file<>'.' && $file<>'..') { if (is_dir($path.'/'.$file)) { check_dir($path.'/'.$file); } else { if (is_writable($path.'/'.$file)) { echo '<font color="green">'.$file.'</font><br>'; } else { echo '<font color="red">'.$file.'</font><br>'; } } } } closedir($dh);}check_dir('../temp');check_dir('../templates');check_dir('../pages');check_dir('../languages');check_dir('../media');