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

asp简单文件上传源码


文件1.上传界面文件   upload.htm
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>文件上传</title>
</head>
<body>
<form method="POST" action="SaveFile.asp">
文件上传:<input type="file" name="file" size="42">&nbsp;<input type="submit" value="提交" name="bb">
</form>
</body>
</html>
文件2.保存上传文件   SaveFile.asp
<%
dim file,filename,houzui
file = Request.Form("file")
if file="" then
 response.write"<script>alert('请选择要上传的文件!');window.location.href='upload.htm';</script>"
else
 houzui=mid(file,InStrRev(file, "."))
 
 if houzui=".gif" or houzui=".jpg" or houzui=".bmp" then   '允许上传的文件类型
  filename=year(date) & month(date) & day(date) & Hour(time) & minute(time) & second(time) & houzui
  Set objStream = Server.CreateObject("ADODB.Stream")
  objStream.Type = 1
  objStream.Open
  objStream.LoadfromFile file
  objStream.SaveToFile Server.MapPath(filename),2
  objStream.Close
//============================把文件名写入数据库,如无需要,可删除此段代码!
  Set conn = Server.CreateObject("ADODB.Connection")
  conn.open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("mb.mdb")
  set rs=server.CreateObject("adodb.recordset")
  rs.open "select*from img",conn,1,2
  rs.addnew
  rs("name")=filename
  rs.update
  set rs=nothing
 &


相关文档:

asp图片滚动

<%
Const New_img=10     
set rs_Product=server.createobject("adodb.recordset")
sqltext="select top " & New_img & " * from 0791idc_Product order by ID"
rs_Product.open sqltext,conn,1,1
if not rs_Product.EOF then%>
<div align='center' id='demo' style='o ......

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

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

asp 摄像头编程技术应用

代码:
<%@ LANGUAGE=VBScript CodePage=65001%>
<%
private function decodeBase64(base64) 
   dim DM, EL 
   Set DM = CreateObject("Microsoft.XMLDOM") 
   Set EL = DM.createElement("tmp") 
   EL.DataType = "bin.base64"
& ......

asp access utf 中文 乱码怎么办


asp 中文乱码,asp access 乱码,asp 刷新后乱码,asp utf 8乱码,ajax 乱码 asp,asp 汉字乱码,asp乱码怎么办
用utf-8编码用在新的网站上,不想问题还真多,所以找了些文章,帖子,看了看,等下有用的就贴下面了。
今天,我开始把 CODEPAGE="936" 改成 CODEPAGE="65001"
把charset=gb2312改成 charset=utf-8
可是还是乱码 ......

ASP生成静态网页的多种方法



 
ASP生成静态网页的多种方法
收藏



使用FSO生成
<%
'使用FSO生成
Set fs = CreateObject("Scripting.FileSystemObject")
NewFile=Server.MapPath("ud03/fso.htm")
'新建 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号