<table cellspacing="0" cellpadding="0"><tr><td class="t_f" id="postmessage_61068"> <div class="blockcode"> <div id="code_X49"><ol> <li> <?php <li>$dir = "PUT_PATH_TO_DIR_HERE";</li> <li> <li>// Open a known directory, and proceed to read its contents</li> <li>if (is_dir($dir)) {</li> <li> if ($dh = opendir($dir)) {</li> <li> while (($file = readdir($dh)) !== false) {</li> <li> echo "filename: $file : filetype: " . filetype($dir . $file) . "\n";</li> <li> }</li> <li> closedir($dh);</li> <li> }</li> <li>}</li> <li>?></li> <li> </ol></div> <em onclick="copycode($('code_X49'));">复制代码</em> </div> <br> </td></tr></table> <div class="ptg mbm mtn"> 目录下, php</div> <div id="comment_61068" class="cm"> </div> <div id="post_rate_div_61068"></div> <br><br>