I have a script that lists a directory on a webpage.
so far to block something from not showing I have to manually enter the name into the script to avoid display. is there a way I can do this with a wildcard and a static extension. i.e. dont show .gif or .txt only logs or something like that.
current array that gets checked is
$hide_files = array(
'.' => 'yes',
'..' => 'yes',
'index.html' => 'yes',
'index.php' => 'yes',
'htpwd.pwd' => 'yes'
);
and I want something like
$hide_files = array(
'.' => 'yes',
'..' => 'yes',
'index.html' => 'yes',
'index.php' => 'yes',
'htpwd.pwd' => 'yes',
'*.gif' => 'yes'
);
TIA