Hey guys!
I tried to browse a list of the php files into my directory but it doesn't show any php file! I tried to use the same cody but now showing all kinds o file and it showed everything, but not php files!!!
code:
<?
$nome_dir = "mensagens/"; //one directory up
$dir = opendir($nome_dir);
$i = 0;
while($nom_arquivo = readdir($dir)){
if ($nom_arquivo != "." && $nom_arquivo != ".."){
$ext = substr($nom_arquivo,-4);
if ($ext == ".php"){
$arquivos[$i] = $nom_arquivo;
$i++;
}
}
}
$max = count($arquivos);
for($i=0; $i<$max; $i++){
print("Arquivo é:");
print("$arquivo[$i]<br>");
}
exit;
?>