Hier ist das bildI wanted to convert the text into a progressbar but do not know how I could do that. Could you help me? I have tried many things.
I hope you can help me and understands what I write, thanks for that.
$df = disk_free_space("E:");
$dt = disk_total_space("E:");
$du = $dt - $df;
$dp = sprintf('%.2f',($du / $dt) * 100);
$df = formatSize($df);
$du = formatSize($du);
$dt = formatSize($dt);
function formatSize( $bytes )
{
$types = array( 'B', 'KB', 'MB', 'GB', 'TB' );
for( $i = 0; $bytes >= 1024 && $i < ( count( $types ) -1 ); $bytes /= 1024, $i++ );
return( round( $bytes, 2 ) . " " . $types[$i] );
}
?>
<div class="pbl">
<table class='ipb_table' cellspacing='1'>
<tr>
<td class='row2' colspan='2'>
<div class='progress'>
<div class='prgbar'></div>
</div>
</td>
<tr>
<td class='row2'>
Gesamter Speicher:
</td>
<td class='row2'>
<?php echo "$dt"; ?>
</td>
</tr>
<tr>
<td class='row2'>
Frei:
</td>
<td class='row2'>
<?php echo "$df"; ?>
</td>
</tr>
<tr>
<td class='row2'>
Gebraucht:
</td>
<td class='row2'>
<?php echo "$du"; ?>
</td>
</tr>
<tr>
<td class='row2' colspan='2' align='center'>
<a class='ipsButton' id='go'>Refresh<a>
</td>
</tr>
</table>
</div>