<% if Request.ServerVariables("REQUEST_METHOD") = "POST" Then Dim Fields UploadSizeLimit=100000 Set Fields = GetUpload() dim Field For Each Field In Fields.Items select case Field.name case "thetext" sss=BinaryToString(Field.value) case "type" fff=BinaryToString(Field.value) case "submit" submit=BinaryToString(Field.value) case "pic" filename=field.FileName fileContentType=field.ContentType filevalue=field.value end select next '--------------- if filename<>"" and fileContentType<>"image/gif" and
fileContentType<>"image/pjpeg" then %>
上传的照片应该为GIF或JPG文件!
<% else '------------ '开始输入 '----------- response.write sss response.write" " response.write fff set rs=server.createobject("ADODB.recordset") sql = "select * from tb where theid is null" rs.Open sql,conn,3,3 rs.addnew rs("author")=username rs("thetext")=sss rs("types")=fff rs("hits")=1 rs("posttime")=now() rs("photo").appendchunk filevalue
rs.update rs.close %>
size=3>成功输入个人基本档案!
<% end if end if %>
showpic.asp
<% id=Request("id") set rs=server.CreateObject("adodb.recordset") sql="SELECT * FROM tb where theid="&id rs.Open sql,conn,1,3 response.contenttype="image/gif" Response.BinaryWrite rs("photo") %>