How to obtain system partition information by using php in Linux

Source: Internet
Author: User
In Linux, the method for php to obtain system partition information is linuxphp. In Linux, php obtains the system partition information. in this document, linuxphp describes how to obtain the system partition information by php in Linux. Share it with you for your reference. How to obtain system partition information by using php in Linux? linuxphp

This article describes how to obtain system partition information by using php in Linux. Share it with you for your reference. The specific implementation method is as follows:

$ Pars = array_filter (explode ("\ n", 'df-h'); foreach ($ pars as $ par) {if ($ par {0 }== '/') {$ _ tmp = array_values (array_filter (explode ('', $ par ))); reset ($ _ tmp); echo "partition mount point: {$ _ tmp ['5']},". "Total Size: {$ _ tmp ['1']}". "Used: {$ _ tmp ['2']} ({$ _ tmp ['4']})
";}}

I hope this article will help you with php programming.

Examples in this article describes how to obtain system partition information by using php in Linux. Share it with you for your reference. Implementation...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.