易截截图软件、单文件、免安装、纯绿色、仅160KB

无组件ASP文件上传源代码

记得在建立一个文件夹"updata"
saveannounce_upload.asp 上传页
------------------------------------
<html>
<head>
<style type="text/css
">
body {font-size:9pt;}
input {font-size:9pt;}
</style>
<title>文件上传</title>
</head>
<body>
<form name="form" method="post" action="saveannouce_upfile.asp" enctype="multipart/form-data" >
文件
<input type="file" name="file1" size=10>
<input type="submit" name="Submit" value="上传">
</form>
</body>
</html>
------------------------------------
saveannouce_upfile.asp 保存文件到服务器

------------------------------------
<!--#include FILE="upload.inc"-->
<html>
<head>
<title>文件上传</title>
</head>
<body>
<%
dim upload,file,formName,formPath
set upload=new upload_5xSoft ''建立上传对象
formPath=upload.form("filepath") ''在目录后加(/)
if right(formPath,1)<>"/" then formPath=formPath&"/"
for each formName in upload.file ''列出所有上传了的文件
set file=upload.file(formName) ''生成一个文件对象
if file.filesize<100 then
response.write "<font size=2>请先选择你要上传的文件 [ <a href=# onclick=history.go(-1)>重新上传</a> ]</font>"
response.end
end if
if file.filesize>500*1000 then '设置上传文件大小为500K
response.write "<font size=2>文件大小超过了限制 500K [ <a href=# onclick=history.go(-1)>重新上传</a> ]</font>"
response.end
end if
if file.FileSize>0 then ''如果 FileSize > 0 说明有文件数据
file.SaveAs Server.mappath("updata\"&file.FileName) ''保存文件
end if
set file=nothing
next
set upload=nothing
response.write "<font size=2>文件上传成功 [ <a href=# o


相关文档:

asp从数据库中输出的东西换行

 <%  
Set rs=Server.CreateObject("ADODB.RecordSet")
sql="select * from 0791idc_News where BigClassName='家装课堂' order by ID desc"
rs.Open sql,Conn,1,1
if rs.eof and rs.bof then
  response.Write("暂时没有记录")
else
%>
         ......

asp连接access数据例子

<%Dim connstrconnstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("Stu.mdb")
Set bb = Server.CreateObject("ADODB.Connection")
bb.Open connstr%>
<html>
<head>
<meta http-equiv="content-Language" content="zh-cn" />
<meta http-equiv="Content-Type ......

简单的asp分词算法(正向最大匹配)

最近写站内搜索,所以研究了一下算法,该算法的原理如图显示。
以下是一个用asp写的简单的分词程序主要的代码,词库我已经用access建立好了。
如果要注重效率,MarLen的选取很是重要,否则效率会十分低下,这里MarLen我选取的是5。
 
dim faword : faword = ""
do while (len(fword) > 0)
tword = left(fwor ......

asp数据库连接总是出错的不完全解决方案

使用Dreamweaver测试连接成功,但是IIS里面运行却总是错误百出,看了下面这篇博文问题才得以解决、、、
一般情况下asp可以正常运行,但只要连接数据库就提示,Microsoft JET Database Engine 错误
'80004005',我的电脑因为用批处理清理文件,所以不能运行了, 只
1.查看数据库连接语句没有发现错误;
2.查看文件夹的权限已 ......

asp防SQL注入函数


'SQL防注入函数,调用方法,在需要防注入的地方替换以前的request("XXXX")为SafeRequest("XXXX")
  
'www.yongfa365.com
  
  
Function
 SafeRequest(ParaValue)   
    ParaValue = 
Trim
(
Request
(Pa ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号