广告联盟网

 找回密码
 注册
12
返回列表 发新帖
楼主: mengyu8505
打印 上一主题 下一主题

怎样让目录直读只读图片呢...

[复制链接]
11#
发表于 2007-7-16 | 只看该作者
<img src="images/smilies/sad.gif" smilieid="2" border="0" alt="" /> 只能顶了,
12#
发表于 2007-7-16 | 只看该作者
PHP学这么好啊
13#
发表于 2007-7-16 | 只看该作者
送给我,我来弄
14#
发表于 2007-7-16 | 只看该作者
关注
15#
发表于 2007-7-16 | 只看该作者
<br><br><div class="msgbody"><div class="msgheader">QUOTE:</div><div class="msgborder">&lt;?php<br />&nbsp;&nbsp;$current_dir = 'e:';<br />&nbsp;&nbsp;$dir = opendir($current_dir);<br /><br />&nbsp;&nbsp;while ($file = readdir($dir))<br />&nbsp;&nbsp;{ <br />&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; $extend =explode(&quot;.&quot; , $file);<br />&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; if ($extend[1] == &quot;gif&quot;) {<br />&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; echo &quot;$file&quot;.&quot;&lt;br /&gt;&quot;;<br />&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp;&nbsp;}<br />&nbsp;&nbsp;?&gt;</div></div><br>偶写了个,可以显示出来,但是提示有错误<br /><br />才学<br /><br />[<i> 本帖最后由 支付宝 于 2007-7-16 12:40 编辑 </i>]
16#
 楼主| 发表于 2007-7-16 | 只看该作者
<br><br><div class="msgbody"><div class="msgheader">QUOTE:</div><div class="msgborder">原帖由 <i>支付宝</i> 于 2007-7-16 12:39 发表 <a href="http://www.im286.com/redirect.php?goto=findpost&amp;pid=20570669&amp;ptid=2069399" target="_blank"><img src="http://www.im286.com/images/common/back.gif" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.im286.com/images/common/back.gif');}" onmousewheel="return imgzoom(this);" alt="" /></a><br /><br /><br /><br />偶写了个,可以显示出来,但是提示有错误<img src="images/smilies/sad.gif" smilieid="2" border="0" alt="" /><br /><br />才学<img src="images/smilies/sad.gif" smilieid="2" border="0" alt="" /> </div></div><br>哈哈,可以喽~~~<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">&lt;html&gt;<br />&lt;head&gt;<br />&nbsp;&nbsp;&lt;title&gt;Browse Directories&lt;/title&gt;<br />&nbsp;&nbsp;&lt;style type=&quot;text/css&quot;&gt;<br />&lt;!--<br />@import url(&quot;style.css&quot;);<br />--&gt;<br />&nbsp;&nbsp;&lt;/style&gt;<br />&lt;/head&gt;<br />&lt;body&gt;<br />&lt;table width=&quot;100%&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; bordercolor=&quot;#64A7DE&quot;&gt;<br />&nbsp;&nbsp;&lt;tr&gt;<br />&nbsp; &nbsp; &lt;td&gt;<br />&lt;?php<br />&nbsp;&nbsp;$current_dir = './photo/';<br />&nbsp;&nbsp;$dir = opendir($current_dir);<br />&nbsp;&nbsp;while ($file = readdir($dir))<br />&nbsp;&nbsp;{<br />&nbsp; &nbsp; $s=explode(&quot;.&quot;,$file);<br />&nbsp; &nbsp;&nbsp;&nbsp;if($s[1]==&quot;jpg&quot; or $s[1]==&quot;bmp&quot; or $s[1]==&quot;png&quot; or $s[1]==&quot;gif&quot;)<br />&nbsp; &nbsp;&nbsp; &nbsp;{<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />?&gt;&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&amp;nbsp;&lt;?=&quot;&lt;a href='photo/$file' target='_blank'&gt;&quot;?&gt;&lt;img src='&lt;? echo &quot;photo/$file&quot;?&gt;' width=120 style='border:6px'&gt;&lt;?=&quot;&lt;/a&gt;&quot;?&gt;<br /><br />&lt;?&nbsp; &nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;} <br /> closedir($dir); <br />?&gt;<br />&lt;/td&gt;<br />&nbsp;&nbsp;&lt;/tr&gt;<br />&lt;/table&gt; <br />&lt;/body&gt;<br />&lt;/html&gt;</div></div><br>
17#
 楼主| 发表于 2007-7-16 | 只看该作者
<img src="images/smilies/tongue.gif" smilieid="8" border="0" alt="" /> 谢谢啦宝宝~~
18#
发表于 2007-7-16 | 只看该作者
<br><br><div class="msgbody"><div class="msgheader">QUOTE:</div><div class="msgborder">原帖由 <i>mengyu8505</i> 于 2007-7-16 13:20 发表 <a href="http://www.im286.com/redirect.php?goto=findpost&amp;pid=20571407&amp;ptid=2069399" target="_blank"><img src="http://www.im286.com/images/common/back.gif" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.im286.com/images/common/back.gif');}" onmousewheel="return imgzoom(this);" alt="" /></a><br /><br /><br />哈哈,可以喽~~~<br /><br /><br /><br />&nbsp;&nbsp;Browse Directories<br />&nbsp;&nbsp;<br /><br />&nbsp;&nbsp;<br /><br /><br /><br />&nbsp;&nbsp;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp;' width=120 style='border:6px'&gt;<br /><br /><br /><br />&nbsp;&nbsp;<br /> <br /><br /><br /><br /> </div></div><br>多点图片格式噻。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|广告联盟网  

GMT, 2024-9-29 , Processed in 0.066726 second(s), 18 queries .

Powered by Discuz! X3.2

© 2005-2021 www.ggads.com GGADS 广告联盟网

快速回复 返回顶部 返回列表