没有这么详细的信息吧。
disk_free_space -- 返回目录中的可用空间
disk_total_space -- 返回一个目录的磁盘总大小
这样子简单的倒是有。

解决方案 »

  1.   

    自己顶一下
    内存怎么求啊 或者CPU使用情况也可以阿。
      

  2.   

    你研究一下phpsysinfo的源代码吧,里面什么都有了,连硬件配置都能列出来。
      

  3.   

    http://prdownloads.sourceforge.net/phpsysinfo/phpsysinfo-2.5.2-rc1.tar.gz?download
    楼上说的不错,phpsysinfo不错,可以研究。
      

  4.   

    研究好了,使用COM作的。
    谢谢各位,做好后发出来 结帖!
      

  5.   

    问题解决,使用WMI,下面给出取物理内存的代码,还可以取得虚拟内存、CPU、磁盘等所有系统信息。
    $objLocator = new COM("WbemScripting.SWbemLocator");
    $wmi = $objLocator->ConnectServer();
    $buffer = _GetWMI($wmi, "Win32_LogicalMemoryConfiguration", array( "TotalPhysicalMemory" ) );
    $results['total'] = $buffer[0]["TotalPhysicalMemory"];$buffer = _GetWMI($wmi, "Win32_PerfRawData_PerfOS_Memory", array( "AvailableKBytes" ) );
    $results['free'] = $buffer[0]["AvailableKBytes"];
    $results['used'] = $results['total'] - $results['free'];
    $results['percent'] = ceil( ( $results['used'] * 100 ) / $results['total'] );function _GetWMI($wmi, $strClass, $strValue = array() ) {
        
        $objWEBM = $wmi->Get($strClass);    if( PHP_VERSION < 5 ) {
          $objProp = $objWEBM->Properties_;
          $arrProp = $objProp->Next($objProp->Count);
          $objWEBMCol = $objWEBM->Instances_();
          $arrWEBMCol = $objWEBMCol->Next($objWEBMCol->Count);
        } else {
          $arrProp = $objWEBM->Properties_;
          $arrWEBMCol = $objWEBM->Instances_();
        }    foreach($arrWEBMCol as $objItem)
        {
            //reset($arrProp);
            $arrInstance = array();
            foreach($arrProp as $propItem)
            {
                eval("\$value = \$objItem->" .$propItem->Name .";");
                if( empty( $strValue ) ) {
                  $arrInstance[$propItem->Name] = trim($value);
                } else {
                  if( in_array( $propItem->Name, $strValue ) ) {
                    $arrInstance[$propItem->Name] = trim($value);
                  }
                }
            }
            $arrData[] = $arrInstance;
        }
        return $arrData;
      }
      

  6.   

    当然这是在window系统上的做法,phpsysinfo还支持其他很多系统,具体方法在研究拉!结贴!