莆仙生活网
当前位置: 莆仙生活网 > 知识库 >

asp源代码下载

时间:2024-05-16 07:00:24 编辑:莆仙君

可以有办法直接下载网上的ASP文件吗?

实时获取服务器时间,判断当前时间是否是允许运行该文件的时间就可以了。
取得时间代码:script language=javascript type="text/javascript"
//特别注明:北京时间是格林尼治标准时加八小时,因此用的起始时间也是从八点起算的
var secondServer = %=DateDiff("s", "1970-01-01 08:00:00", Now())%;
var secondClient = parseInt(new Date().getTime()/1000);
var secondSub = secondServer - secondClient; //两端时间秒差
function meizzTime(n)
{
var mei = new Date();
mei.setTime(mei.getTime() + n*1000); //得到一个新的时间
var h = (mei.getHours() 9) ? mei.getHours() : "0" + mei.getHours();
var m = (mei.getMinutes() 9) ? mei.getMinutes() : "0" + mei.getMinutes();
var s = (mei.getSeconds() 9) ? mei.getSeconds() : "0" + mei.getSeconds();
document.meizz.clock.value ="【"+ h +":"+ m +":"+ s +"】";
setTimeout("meizzTime(secondSub)", 1000);
}
/script
form name="meizz"
input name="clock" size="12" class="form"
/form


谁有好的论坛源代码,最好是asp的 要简介大方 最好不是动力的

目前ASP的开源论坛动网比较强大 稳定 下载地址:http://bbs.cndw.com/download/Dvbbs8.3_Ac.exe
好多ASP网站都在用
因为ASP的市场占有率逐渐下降 已经很少有人再取开发ASP开源论坛了 所以很少
动网ASP 8.3在以前版本的优点基础上,优化了程序核心,在速度和稳定性上取得了平衡点。在动网ASP 8.3的模板结构上,动网以文本文件的模式保存文件,实现了高速和稳定,文本文件模式的模板,修改更加方便,导入导出更加的轻松简易;在程序核心上,动网重构了核心,改善缓存机制,在速度和稳定性上取得了平衡;在风格界面方面,动网进行重新的整理,做到高速稳定,让用户能有一个更好的体验;无刷新更换皮肤,实现模板和CSS轻松切换;Ajax发帖/回帖模式,让用户体验有了一个新突破;全新的首页布局,实现自定义标签,站长可以轻松DIY;插入阿里妈妈广告出售插件,为站长论坛赢利,轻松运营网站;集成的财付通和全新的支付宝接口,满足站长网上交易的需求。这些功能和性能上的优化,将使得动网ASP 8.2.0有更强大的功能,在保证速度的同时,论坛也能稳定的运行。


求asp无组件上传 源码


上传图片最大730宽限jpg格式


//fileuploads.asp



文件上传



<!--
function checkcom(){
if (document.form1.pic.value==""){
alert("一定要有文件才可以!");
return false;
}
return true;
}
//-->

图 片 上 传



<%
If Request.QueryString("action") = "up" Then
'on error resume next
dim upload,file,formName,formPath,iCount,pic
set upload=new upload_5xsoft ''建立上传对象
' Response.End
set file=upload.file("pic")
if file.FileSize>0 then
pic = file.FileName
sFileSave = lcase(Mid(pic, InStrRev(pic,".")))
if sFileSave ".jpg" and sFileSave ".gif" and sFileSave ".bmp" then
strMsg="alert('只接受jpg,gif,bmp的图形文件!');history.back();"
Response.write strMsg
Response.end
end If
sFileSave=GetRndFileName&sFileSave
file.SaveAs Server.MapPath("../uploadpic")&"/"&sFileSave
pic=sFileSave
end if
set file = nothing
set upload = nothing

%>

//opener.form1.FileName.value = ""
//opener.form1.Width.value = ""
//opener.form1.Height.value = ""
opener.document.all.form.picurl.value = ""
//alert("成功!");
setTimeout("window.close()",1000);

<%
response.write ""
Response.End
End If
%>


&action=up" onSubmit="return checkcom();">



图 片 上 传


















<%
Function GetRndFileName()
Dim tmpstr
randomize
tmpstr=Int(1000*rnd)
tmpstr=""&year(now)&month(now)&day(now)&hour(now)&minute(now)&second(now)&tmpstr
GetRndFileName=tmpstr
End Function
%>


//upload_5xsoft.inc

dim Data_5xsoft

Class upload_5xsoft

dim objForm,objFile,Version

Public function Form(strForm)
strForm=lcase(strForm)
if not objForm.exists(strForm) then
Form=""
else
Form=objForm(strForm)
end if
end function

Public function File(strFile)
strFile=lcase(strFile)
if not objFile.exists(strFile) then
set File=new FileInfo
else
set File=objFile(strFile)
end if
end function


Private Sub Class_Initialize
dim RequestData,sStart,vbCrlf,sInfo,iInfoStart,iInfoEnd,tStream,iStart,theFile
dim iFileSize,sFilePath,sFileType,sFormValue,sFileName
dim iFindStart,iFindEnd
dim iFormStart,iFormEnd,sFormName
Version="化境HTTP上传程序 Version 2.0"
set objForm=Server.CreateObject("Scripting.Dictionary")
set objFile=Server.CreateObject("Scripting.Dictionary")
if Request.TotalBytes<1 then Exit Sub
set tStream = Server.CreateObject("adodb.stream")
set Data_5xsoft = Server.CreateObject("adodb.stream")
Data_5xsoft.Type = 1
Data_5xsoft.Mode =3
Data_5xsoft.Open
Data_5xsoft.Write Request.BinaryRead(Request.TotalBytes)
Data_5xsoft.Position=0
RequestData =Data_5xsoft.Read

iFormStart = 1
iFormEnd = LenB(RequestData)
vbCrlf = chrB(13) & chrB(10)
sStart = MidB(RequestData,1, InStrB(iFormStart,RequestData,vbCrlf)-1)
iStart = LenB (sStart)
iFormStart=iFormStart+iStart+1
while (iFormStart + 10) < iFormEnd
iInfoEnd = InStrB(iFormStart,RequestData,vbCrlf & vbCrlf)+3
tStream.Type = 1
tStream.Mode =3
tStream.Open
Data_5xsoft.Position = iFormStart
Data_5xsoft.CopyTo tStream,iInfoEnd-iFormStart
tStream.Position = 0
tStream.Type = 2
tStream.Charset ="gb2312"
sInfo = tStream.ReadText
tStream.Close
'取得表单项目名称
iFormStart = InStrB(iInfoEnd,RequestData,sStart)
iFindStart = InStr(22,sInfo,"name=""",1)+6
iFindEnd = InStr(iFindStart,sInfo,"""",1)
sFormName = lcase(Mid (sinfo,iFindStart,iFindEnd-iFindStart))
'如果是文件
if InStr (45,sInfo,"filename=""",1) > 0 then
set theFile=new FileInfo
'取得文件名
iFindStart = InStr(iFindEnd,sInfo,"filename=""",1)+10
iFindEnd = InStr(iFindStart,sInfo,"""",1)
sFileName = Mid (sinfo,iFindStart,iFindEnd-iFindStart)
theFile.FileName=getFileName(sFileName)
theFile.FilePath=getFilePath(sFileName)
'取得文件类型
iFindStart = InStr(iFindEnd,sInfo,"Content-Type: ",1)+14
iFindEnd = InStr(iFindStart,sInfo,vbCr)
theFile.FileType =Mid (sinfo,iFindStart,iFindEnd-iFindStart)
theFile.FileStart =iInfoEnd
theFile.FileSize = iFormStart -iInfoEnd -3
theFile.FormName=sFormName
if not objFile.Exists(sFormName) then
objFile.add sFormName,theFile
end if
else
'如果是表单项目
tStream.Type =1
tStream.Mode =3
tStream.Open
Data_5xsoft.Position = iInfoEnd
Data_5xsoft.CopyTo tStream,iFormStart-iInfoEnd-3
tStream.Position = 0
tStream.Type = 2
tStream.Charset ="gb2312"
sFormValue = tStream.ReadText
tStream.Close
if objForm.Exists(sFormName) then
objForm(sFormName)=objForm(sFormName)&", "&sFormValue
else
objForm.Add sFormName,sFormValue
end if
end if
iFormStart=iFormStart+iStart+1
wend
RequestData=""
set tStream =nothing
End Sub

Private Sub Class_Terminate
if Request.TotalBytes>0 then
objForm.RemoveAll
objFile.RemoveAll
set objForm=nothing
set objFile=nothing
Data_5xsoft.Close
set Data_5xsoft =nothing
end if
End Sub


Private function GetFilePath(FullPath)
If FullPath "" Then
GetFilePath = left(FullPath,InStrRev(FullPath, "\"))
Else
GetFilePath = ""
End If
End function

Private function GetFileName(FullPath)
If FullPath "" Then
GetFileName = mid(FullPath,InStrRev(FullPath, "\")+1)
Else
GetFileName = ""
End If
End function
End Class

Class FileInfo
dim FormName,FileName,FilePath,FileSize,FileType,FileStart
Private Sub Class_Initialize
FileName = ""
FilePath = ""
FileSize = 0
FileStart= 0
FormName = ""
FileType = ""
End Sub

Public function SaveAs(FullPath)
dim dr,ErrorChar,i
SaveAs=true
if trim(fullpath)="" or FileStart=0 or FileName="" or right(fullpath,1)="/" then exit function
set dr=CreateObject("Adodb.Stream")
dr.Mode=3
dr.Type=1
dr.Open
Data_5xsoft.position=FileStart
Data_5xsoft.copyto dr,FileSize
dr.SaveToFile FullPath,2
dr.Close
set dr=nothing
SaveAs=false
end function
End Class


上传到上一个目录的uploadpic里面


从网上下载的ASP源代码怎么运用到自己的网页中呢?

100分求助!
详细见知道问题地址:http://zhidao.baidu.com/question/184019803.html

一个950*90的位置在网站中部,我想把它分割成成四个240*60左右广告位(保证网页不变形的前提)。请问怎么实现啊??但分割后我又怕整个变形!麻烦详细点,万分感谢!!

对了,我的地址是 www.91mfzy.com 请看一下具体位置,帮我看看我的想法能否实现??一定要网站不变形啊。


网上下载了asp源码,怎么样才能运行

三种方法:
1、下载个netbox之类的asp本地调试工具,安装后根据软件的提示操作即可;
2、利用windows系统自带的IIS在自己的电脑架设个WEB服务器,然后把你的代码放到wwwroot目录或另建个虚拟目录即可;
3、在网上申请个支持ASP的虚拟主机空间,把你的代码通过FTP上传到空间指定目录即可。

其实你的代码中不是包含有word文档吗?打开看看,里面应该有操作说明的。


如何在ASP.NET中下载文件

  但是这样的下载有几个问题:1. 无法下载不存在的文件:例如,我们若是想把程序动态(临时)产生的文字,当作一个文件下载的时候(也就是该文件其实原先并不是真的存在,而是动态产生的),就无法下载。2. 无法下载存储于数据库中的文件:这是类似的问题,该文件并没有真的存在,只是被存放在数据库中的某个位置(某笔记录中的某个栏位)的时候,就无法下载。3. 无法下载不存在于Web文件夹中的文件:文件确实存在,但该文件夹并不是可以分享出来的Web文件夹,例如,该文件的位置在C:/winnt,您总不会想要把该文件夹当作Web文件夹吧?这时候,由于您无法使用Redirect指向该位置,所以无法下载。4. 下载文件后,原本的页面将会消失。1. 这个文件可能是通过ASP.NET程序动态产生的,而不是确实存在于Server端的文件;2. 或是它虽然存在于伺服器端的某个实体位置,但我们并不想暴露这个位置(如果这个位置公开,很可能没有权限的用户也可以在网址栏上输入URL直接取得!!!)3. 或是这个位置并不在网站虚拟路径所在的文件夹中。(例如C:/Windows/System32...)  这时候,我们就得采用不同的方式:Shared Function DownloadFile(ByVal WebForm As System.Web.UI.Page, ByVal FileNameWhenUserDownload As String, ByVal FileBody As String)  WebForm.Response.ClearHeaders()  WebForm.Response.Clear()  WebForm.Response.Expires = 0  WebForm.Response.Buffer = True  WebForm.Response.AddHeader(Accept-Language, zh-tw)  '文件名称  WebForm.Response.AddHeader(content-disposition, attachment; filename= & Chr(34) & System.Web.HttpUtility.UrlEncode(FileNameWhenUserDownload, System.Text.Encoding.UTF8) & Chr(34))  WebForm.Response.ContentType = Application/octet-stream  '文件内容  WebForm.Response.Write(FileBody)  WebForm.Response.End()End Function  上面这段代码是下载一个动态产生的文本文件,若这个文件已经存在于服务器端的实体路径,则可以通过下面的函数:Shared Sub DownloadFile(ByVal WebForm As System.Web.UI.Page, ByVal FileNameWhenUserDownload As String, ByVal FilePath As String)  WebForm.Response.ClearHeaders()  WebForm.Response.Clear()  WebForm.Response.Expires = 0  WebForm.Response.Buffer = True  WebForm.Response.AddHeader(Accept-Language, zh-tw)  '文件名称  WebForm.Response.AddHeader(content-disposition, attachment; filename= & Chr(34) & System.Web.HttpUtility.UrlEncode(FileNameWhenUserDownload, System.Text.Encoding.UTF8) & Chr(34))


BAT批处理中循环执行程序的代码

vbs 安静,用vbs吧

do
wscript.sleep 3000
createobject("wscript.shell").run "delete.bat"
loop

保存为vbs
-----------------------------------------
如果想停止这一动作
就复制下面的代码

getobject("winmgmts:\\.\root\cimv2").execquery("select * from win32_process where name='wscript.exe'")

保存为另一个vbs

如果一定要用bat的话,还得后台运行,是很占用cpu的,要启动ping.exe.这样非常的卡!
-----------------------------------------

@echo off&call:. delete.bat
:.
for /l %%1 in (0)do ping /n 60 127.1>nul&start "" "%1"
::60=30余秒
这是批处理,保存为批处理类型文件