|
它把zip,这些文件都读出来了,怎样能让他只读图片不读其他文件你呢...<img src="images/smilies/sad.gif" smilieid="2" border="0" alt="" /><br><br><div class="msgbody"><div class="msgheader"><div class="right"><a href="###" class="smalltxt" onclick="copycode($('code0'));">[Copy to clipboard]</a> <a class="smalltxt" href="###" onclick="toggle_collapse('code0');">[ <span id="code0_symbol">-</span> ]</a></div>CODE:</div><div class="msgborder" id="code0"><html><br /><head><br /> <title>Browse Directories</title><br /> <style type="text/css"><br /><!--<br />@import url("style.css");<br />--><br /> </style><br /></head><br /><body><br /><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#64A7DE"><br /> <tr><br /> <td><br /><?php<br /> $current_dir = 'D:\wwwroot\AppServ\www\mengyu\photo';<br /> $dir = opendir($current_dir);<br /> $i=0; <br /> while ($file = readdir($dir))<br /> { $i++; <br /> if($i>2) <br /> { echo "";<br />?> <br /> <br />&nbsp;<?="<a href='photo/$file' target='_blank'>"?><img src='<? echo "photo/$file"?>' width=120 style='border:6px'><?="</a>"?><br /><br /><? } } <br /> //closedir($dir); <br />?><br /></td><br /> </tr><br /></table> <br /><a href='upload.php' target='_blank'>图片上传</a><br /></body><br /></html></div></div><br> |
|