存档

2008年8月29日 的存档

与生成DOC文件同时接的,废话不多说,直接发代码

< %
download=trim(request("Downloads"))
if download="Get:输出结果.xls" then
Response.ContentType = "Application/msexcel"
Response.AddHeader "Content-Disposition","attachment; filename=输出结果.xls"
 
‘+飞猫友情制作
‘http://www.miaoqiyuan.cn
path=server.mappath("./")
set fso=server.createobject("Scripting.FileSystemObject")
set fpo=fso.getfolder(path)
for each files in fpo.files
ftype=fso.getExtensionName(files) ‘文件扩展名
if ftype="mp3" or ftype="wma" or ftype="txt" then
response.write replace(files.name,"."&ftype,"")&" "
i=i+1
if(i mod 3)=0 then i=0:response.write chr(13)+chr(10)
end if
next
set fpo=Nothing
Set fso=Nothing
else
response.write "<a href=""?Downloads=Get:输出结果.xls&Pid="&date()&"-"&replace(time(),":","-")&""">下载Excel输出结果"
end if
%>

八 29th, 2008 | Filed under ASP, Show(展示)
标签: , ,

ASP生成DOC(Word文件)

八 29th, 2008 | Filed under ASP, Show(展示)
标签: , ,

在项目开发时,特别是多人开发时,很容易造成那个函数名重复而导致程序出错。
经过几日的项目开发,我终于找到解决方法,所有功能封装到类,类内部怎么命名都无所谓了~
而且调用的时候时候也很简单,直接调用类就好了,大大的简化了代码,实现程序内容分离
<div class=”wid982″ id=”onecontent”>
<!–热门活动开始–>
    <div class=”martop10 wid224 fl mar-right6″>
     <%Call FlyCatDesign.GetIndex(“热门活动”)%>
    </div>
<!–热门活动结束–>
<!–顶部广告开始–>
    <div class=”martop10 wid408 fl”>
     <%Call FlyCatDesign.GetIndex(“顶部广告”)%>
    </div>
<!–顶部广动开始–>
<!–最新资讯结束–>
    <div class=”martop10 wid338 fl mar-left6″>
     <%Call FlyCatDesign.GetIndex(“最新资讯”)%>
    </div>
<!–最新资讯结束–>
 <div class=”clear”></div>
</div>
<div class=”wid982  mar-right6″ id=”onecontent”>
<!–行业市场开始–>
 <div class=”martop10 wid640 fl ShiChangList”>
     <%Call FlyCatDesign.GetIndex(“行业市场”)%>
    </div>
<!–行业市场结束–>
<!–行业市场右侧开始–>
 <div class=”martop10 wid338 fl mar-left6″>
     <%Call FlyCatDesign.GetIndex(“行业市场右侧”)%>
    </div>
<!–行业市场右侧结束–>
 <div class=”clear”></div>
</div>

八 29th, 2008 | Filed under Experience(经验)
标签: