You get a bonus - 1 coin for daily activity. Now you have 1 coin

How to find out how much free and used disk space there is - php html linux

Practice




How to find out how much free and used disk space there is - php html linux

disk_total_space("/"); - find out the amount of used space on Linux
disk_total_space("C:"); - find out the amount of used space on Windows

disk_free_space("/"); find out the amount of free space on Linux
disk_free_space("C:"); find out the amount of free space on Windows


Free space on disk:


disk_total_space("/"); - find out the amount of used space on Linux
disk_total_space("C:"); - find out the amount of used space on Windows

disk_free_space("/"); find out the amount of free space on Linux
disk_free_space("C:"); find out the amount of free space on Windows

CODE:
<p class="">
Свободное место на диске :

<div class="" style="background-color: #376ea6;
width: 300px;
height: 30px;
border-radius: 4px;
border: 0px;">

<div class="" style="
background-color: #a00;
width: <?=round($fsp)?>px;
height: 30px;
border-radius: 4px;
border: 0px;
color: white;
line-height: 28px;
text-align: center;">

<?=round($fs/1024/1024/1024)?> ГБт из <?=round($tt/1024/1024/1024)?> Гбт

</div>
</div>
</p>


exec('df -h', $output)


you can of course parse this, but it's more complicated





you can of course parse this, but it's more complicated

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Running server side scripts using PHP as an example (LAMP)"

Terms: Running server side scripts using PHP as an example (LAMP)