广告联盟网

 找回密码
 注册
查看: 860|回复: 13
打印 上一主题 下一主题

头像刷新就变的制作全过程!

[复制链接]
跳转到指定楼层
1#
发表于 2007-7-13 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本人语言表达能力较差,大家将就看吧!<br /><br />[本代码有人提供过,我是抄来的!]<br /><br />1.将代码部分保存为index.asp;<br />2.建1个文件夹,名字自己定,譬如head;<br />3.把&quot;index.asp&quot;文件放在head文件夹中;<br />4.在head文件夹中建一个“images”文件夹,将图片放在这里!<br />5.上传head文件夹以及文件夹内所有文件;<br />6.你可以通过网址<a href="http://www.xxx.com/head/" target="_blank">http://www.xxx.com/head/</a> 访问,可以看到正常显示,并且刷新一次变一张。到此就应该结束了么?没有,因为做头像插入上边这个网址不可以,你可以这样插入头像:<a href="http://www.xxx.com/head/?1." target="_blank">http://www.xxx.com/head/?1.</a> jpg 试试吧,应该没问题了。<br><br><div class="msgbody"><div class="msgheader">QUOTE:</div><div class="msgborder">&lt;%<br />dim JieImg<br />Randomize<br />JieImg = Int( Rnd * (<font color="red">13</font>+1)) &amp; &quot;.jpg&quot;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;'<font color="red">13</font>为总图片数-1<br />Call ShowImg(JieImg)<br />Sub ShowImg(ImgFileName)<br />Dim strFilePath, strFileSize, strFileName<br />Const adTypeBinary = 1<br />Response.Buffer = True<br />strFileName=ImgFileName<br />FilePath=Server.MapPath(&quot;images/&quot;&amp;strFileName)&nbsp; &nbsp; <br />Response.Clear<br />Set objStream = Server.CreateObject(&quot;ADODB.Stream&quot;)<br />objStream.Open<br />objStream.Type = adTypeBinary<br />objStream.LoadFromFile FilePath<br />strFileSize =objStream.size<br />strFileType = lcase(Right(strFileName, 4))<br />Select Case strFileType<br />&nbsp; &nbsp; Case &quot;.gif&quot;<br />&nbsp; &nbsp; C<br />&nbsp; &nbsp; Case &quot;.jpg&quot;, &quot;jpeg&quot;<br />&nbsp; &nbsp; C<br />&nbsp; &nbsp; Case Else<br />&nbsp; &nbsp; C<br />End Select<br />Response.AddHeader &quot;Content-Length&quot;, strFileSize<br />Response.Charset = &quot;UTF-8&quot;<br />Response.ContentType = ContentType<br />Response.BinaryWrite objStream.Read<br />Response.Flush<br />objStream.Close<br />Set objStream = Nothing<br />End Sub<br />%&gt;</div></div><br>
2#
 楼主| 发表于 2007-7-13 | 只看该作者
待编辑!
3#
发表于 2007-7-13 | 只看该作者
4#
发表于 2007-7-13 | 只看该作者
不错,受用了。
5#
发表于 2007-7-13 | 只看该作者
asp还是php
6#
 楼主| 发表于 2007-7-13 | 只看该作者
<br><br><div class="msgbody"><div class="msgheader">QUOTE:</div><div class="msgborder">原帖由 <i>yuanb</i> 于 2007-7-13 09:00 发表 <a href="http://www.im286.com/redirect.php?goto=findpost&amp;pid=20519828&amp;ptid=2064259" 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 />asp还是php </div></div><br>我的用的asp&nbsp; &nbsp;没试别的
7#
发表于 2007-7-13 | 只看该作者
果然...收咧...<img src="images/smilies/ohh.gif" smilieid="19" border="0" alt="" /> <img src="images/smilies/ohh.gif" smilieid="19" border="0" alt="" /> <img src="images/smilies/ohh.gif" smilieid="19" border="0" alt="" /> <img src="images/smilies/ohh.gif" smilieid="19" border="0" alt="" />
8#
发表于 2007-7-13 | 只看该作者
asp的那我就收了哈
9#
发表于 2007-7-13 | 只看该作者
可惜是ASP的
10#
发表于 2007-7-13 | 只看该作者
php只需要一条代码<img src="images/smilies/lol.gif" smilieid="9" border="0" alt="" />
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT, 2024-10-1 , Processed in 0.064825 second(s), 19 queries .

Powered by Discuz! X3.2

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

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