I found a file inside my web root called files.php, and it doesn't seem to be connected to any other files, and I'm not sure I exactly know what the script is supposed to do.
Any ideas?
<?php
function list_files($dir) {
// Returns array of file/directory names from $dir
$i=0;
if ($use_dir = @opendir($dir)) {
while (($file = readdir($use_dir)) !== false) {
if (($file != "..") && ($file != ".")) {
$dir_arr[$i] = "$file";
$i++;
}
}
closedir($use_dir);
}
return $dir_arr;
}
?>