if(strstr($pwdir1,"/home/vpopmail/domains/")) $pw_spaces_count += $pw_shellbak;
便可求出总和.
 另外你写的程序实在太.... >_<
好好改改吧...

解决方案 »

  1.   


    $pwdir1 = mysql_result($result,$i,"pw_dir");
    $pw_shellbak = mysql_result($result,$i,"pw_shellbak");
    $pw_shellbak = $pw_shellbak*1000;
    $status = strstr($pwdir1,"/home/vpopmail/domains/");
    if($status){
      $kongjian += $pw_shellbak;//这不就是求$pw_shellbak的总和吗
    }
      

  2.   

    不是那个我想求出路径,/home/vpopmail/domains/的以分配空间并不是总的空间呀
      

  3.   

    Description
    string strstr ( string $haystack, string $needle, bool $before_needle )Return Values
    Returns the portion of string, or FALSE if needle is not found. 
    ==============================================================
    路过.
    应该用strpos吧,呵呵.