<table cellspacing="0" cellpadding="0"><tr><td class="t_f" id="postmessage_61076"> <div class="blockcode"> <div id="code_rP1"><ol><li><?php<li> function dirSize($directoty){<li> $dir_size=0;<li><li> if($dir_handle=@opendir($directoty))<li> {<li> while($filename=readdir($dir_handle)) {<li> $subFile=$directoty.DIRECTORY_SEPARATOR.$filename;<li> if($filename=='.'||$filename=='..'){<li> continue;<li> }elseif (is_dir($subFile))<li> { <li> $dir_size+=dirSize($subFile);<li> }elseif (is_file($subFile)){<li> $dir_size+=filesize($subFile);<li> }<li> }<li> Closedir($dir_handle);<li> }<li> return ($dir_size) ;<li> }<li><li> $dir_size=dirSize("xym");<li> echoround($dir_size/pow(1024,1),2)."KB";<li>?></li></ol></div> <em onclick="copycode($('code_rP1'));">复制代</em> </div> <br> </td></tr></table> <div class="ptg mbm mtn"> php</div> <div id="comment_61076" class="cm"> </div> <div id="post_rate_div_61076"></div> <br><br>