After i upload some files to my server, and save them in sql, i list them on my site.
while($a = mysqli_fetch_assoc($get_files))
{
$path_parts = pathinfo($a['fajl_file']);
$extension = $path_parts['extension'];
$path = $host.'/documents/'.$a['fajl_file'];
echo '<tr>
<td>'.html($a['fajl_nev']).'</td>
<td>'.date_substr($a['fajl_datetime']).'</td>
<td>'.$extension.'</td>
<td>'.filesize($path).'</td>
<td class="table_text_center">
<a class="table_delete_link delete_data" id="" href="#"><i class="fa fa-download"></i></a>
</td>
</tr>';
}
Where i am listing the files, i want to display not just the name or upload date, i want the file size also.
With this code, i get this error:
Warning: filesize(): stat failed for
When i check the website source, the path i gived, its correct. The files are in the documents folder on the server.