一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

使用asp实现支持附件的邮件系统(三)

时间:2008-01-18 编辑:简简单单 来源:一聚教程网

最后,我们来讲讲如何把内容从数据库中读出来,内容有这么几类,一类是浏览器上可以显示的,例如*.htm,一类是需要下载的,例如*.exe,还有一种是浏览器可以显示但是不能够让他显示的,例如*.asp,请看代码:
<%
Response.Buffer= true
Response.Clear
function getname(oriname)
     thename=oriname
     do while instr(thename,"/")>0
        thename=mid(thename,instr(thename,"/")+1)
     loop
     do while instr(thename,"")>0
        thename=mid(thename,instr(thename,"")+1)
     loop
     getname=thename
end function
function canexec(thechar)
     if instr(thechar,".asp")>0 then
    canexec=false
    exit function
     end if
     if instr(thechar,".asa")>0 then
    canexec=false
    exit function     
     end if
     if instr(thechar,".aspx")>0 then
    canexec=false
    exit function     
     end if
     if instr(thechar,".asax")>0 then
    canexec=false
    exit function     
     end if
     canexec=true
end function
mailID=request("mailID")
se=request("se")
if se<>1 and se<>2 and se<>3 then

热门栏目