0
I’m on a demand for a php system.
I am listing documents from a particular directory that is on the server in my html page
<div class="tab-pane" id="docs">
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>Documento</th>
</tr>
</thead>
<tbody>
<?php
$result = mysql_query("SELECT * FROM gr_documento
WHERE id_entidade_documento = ". $_GET['id']."
AND tipo = 1");
while ($row = mysql_fetch_array($result)) {
?>
<tr>
<td><a href="/upload/docs/<?php echo $row['novo_nome']?>" target=“_blank” ><?php echo $row['nome_documento']?></a></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
I wonder if it is possible to create a column on the left only by appearing an icon according to the extension. Ex:
If the file has the extension . pdf display an icon of connected to the PDF If the file has the extension . xls display an icon connected to Excel If the file has the . doc extension display a Word-connected icon If the file has the extension . txt display a TXT-connected icon
I don’t know if there are any functions that perform this process. They can help me ?
Thanks for the reply, I will perform a test :)
– Robson Freitas