Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature may not be available in some browsers.
Ты вводишь маску файлов, а такого в скрипте не предусмотрено.
Так этого и хочется... выставить права на все index.* и *.htaccess
*.htaccess
Правильно ли я понимаю что теперь нужно собирать/искать блок
поиска по маске и привязывать его к 2му скрипту :/ ?
function _CHMOD_DIR_FILES($chmod,$ext,$enclosed) 
{ 
	global $match;
        foreach (glob("{*,.*}",GLOB_BRACE) as $file) { 
                if ($file=='.' || $file=='..') continue; 
                if (is_dir($file) && $enclosed === TRUE) { 
                   if (!@chdir($file))continue; 
                   chmod($file, $chmod); 
                   _CHMOD_DIR_FILES($chmod,$ext,$enclosed); 
                   chdir(".."); 
                } elseif ((!empty($ext) && $ext == '*' || strtolower(pathinfo($file,PATHINFO_EXTENSION)) == $ext) || preg_match('%'.$match.'%', $file)) { 
                    chmod($file, $chmod); 
                } 
        } 
}
	Может не глобал, а лучше дополнительный параметр в функцию? Тогда она будет независимой от скрипта...Сделай дополнительное поле инпута, туда будешь вписывать регулярки для тех файлов которым нужно поставить chmodPHP:... global $match; ...
засунешь результат поля в переменную $match ну а дальше функция сама ее возьмет.
function _CHMOD_DIR_FILES($chmod,$ext,$enclosed)
{
        foreach (glob("{*,.*}",GLOB_BRACE) as $file) {
                if ($file=='.' || $file=='..') continue;
                if (is_dir($file) && $enclosed === TRUE) {
                   if (!@chdir($file))continue;
                   _CHMOD_DIR_FILES($chmod,$ext,$enclosed);
                   chdir("..");
                } elseif (strtolower(pathinfo($file,PATHINFO_EXTENSION)) == $ext) {
                    chmod($file,$chmod);
                }
        }
}
	function _CHMOD_DIR_FILES($chmod,$ext,$enclosed) 
{ 
    global $match;
        foreach (glob("{*,.*}",GLOB_BRACE) as $file) { 
                if ($file=='.' || $file=='..') continue; 
                if (is_dir($file) && $enclosed === TRUE) { 
                   if (!@chdir($file))continue; 
                   chmod($file, $chmod); 
                   _CHMOD_DIR_FILES($chmod,$ext,$enclosed); 
                   chdir(".."); 
                } elseif ((!empty($ext) && $ext == '*' || strtolower(pathinfo($file,PATHINFO_EXTENSION)) == $ext) || preg_match('%'.$match.'%', $file)) { 
                    chmod($file, $chmod); 
                } 
        } 
}
	   	<tr>
		<td class="menu">НОВЫЙ ИМПУТ by tostrss</td>
		<td align="right"><?=$match;?><INPUT TYPE=TEXT VALUE="/"> </td>
	
 ?index.* и *.html и index.html
Вот этот кусок:
Имхо правильно будет:PHP:elseif (empty($mask) || preg_match('%'.$mask.'%i', $file))
=)PHP:elseif (!empty($mask) || preg_match('%'.$mask.'%i', $file))