Hello. I have a table that should show the name of the files and the date they were updated, but nothing appears. In HTML I only have
<table><?php tabela("/arquivos/formularios/*.*"); ?></table>
And in PHP:
function tabela($var){
$globVar = glob($var);
for ($i=0; $i<count($globVar); $i++) {
$caminho = $globVar[$i];
if (file_exists($caminho)) {
$nome = basename($caminho,".*");
echo "<tr><td class=\"td1\"><a href=\"".$caminho."\">".$nome."</a></td>
<td class=\"td2\">".date("d/m/Y", filemtime($caminho))."</td></tr>";
}
}
}
When I load the page, I just see
<table></table>
Maybe I'm understanding glob () or another wrong function. Thank you if anyone can help me.