| 订阅 | 在线投稿
分享
 
 
当前位置: 王朝网络 >> asp >> yong asp huo qu wen jian md5 zhi

yong asp huo qu wen jian md5 zhi

2008-09-02 06:53:08 编辑來源:互联网 评论
 
 
 
本文为【用asp获取文件md5值】的拼音翻译版
  wang shang asp jia mi zi fu de MD5 hen duo , ye hen pu bian , dan shi dui wen jian jin xing md5 de que hen shao , yin wei shou dao asp yu yan ben shen de xian zhi 。 wo men zhi dao zi fu chuan de md5 ke yi dui ming wen jin xing bu ke ni de jia mi , cong er bao zheng shu ju chu cun huo zhe chuan song de an quan xing 。 tong yang de , dui wen jian jin xing md5 jia mi ye shi wei le bao zheng zai wang luo chuan song shi bu bei xiu gai he xiao yan , ling wai huan you yi ge yong tu jiu shi zai ge ren zhan dian li mian de ying yong : ke yi bao zheng shang chuan de tu pian huo wen jian ju you wei yi xing 。 yuan li shi , shang chuan dao fu wu qi zhi hou , tong shi zai shu ju ku zhong ji lu gai shang chuan wen jian de md5 zhi , zhe yang zai xia ci chuan tong yang wen jian de shi hou , ke yi tong guo cha xun shu ju ku shi fou shi xiang tong de wen jian ,md5 zhi xiang tong , wo men jiu ren wei ta shi xiang tong de wen jian ,md5 zhi jiu shi wen jian de “ shen fen zheng ”, qi shi bai du ye you zhe fang mian de ying yong , zai bai du sou suo tu pian , dian kai tu pian hou , you shi hou hui chu xian “ nin huan ke yi dian ji yi xia lian jie cha kan dao zhe zhang tu pian :XXX wang zhi ”, yuan li ye shi yi yang , dui wen jian jin xing md5。
  fei hua shao shuo , kai shi zheng wen 。
  yi 、asp tong guo xml jiao hu fang shi tiao yong .Net cheng xu shi xian wen jian md5
  asp you yu ben shen yu yan de xian zhi , wu fa shi xian wen jian de md5, dan shi .net que ke yi , na shi bu shi ke yi tong guo .net dui wen jian jin xing md5, ran hou fa song xin xi gei asp jie shou , zhe yang jiu ke yi zuo dao asp de md5 le ne , da an shi ken ding de 。 zhe li she ji dao asp yu .net cheng xu jian de jiao hu , wo yi qian xie guo yi ge asp de lei :《asp chu li xml shu ju de fa song 、 jie shou lei 》, ke yi shang wo de bai du kong jian kan :http://hi.baidu.com/manbutianmi/blog/item/dec182fc6db36587b801a0f6.html, jiang de shi asp chu li xml shu ju de fa song yu jie shou , ke yong yu ge zhong yi gou xi tong zhi jian API jie kou jian tong xun 。 ben wen zheng hao shi zhe ge lei de yi ge ying yong 。 dai ma ru xia :
  asp duan dai ma
  xmlcls.asp
  <%
  Rem chu li xml shu ju de fa song 、 jie shou lei
  '--------------------------------------------------
  ' zhuan zai de shi hou bi xu bao liu ci ban quan xin xi
  ' zuo zhe :walkman
  ' wang zhi : shou ji zhu ti wang :http://www.shouji138.com
  ' ban ben :ver1.0
  '--------------------------------------------------
  Class XmlClass
  Rem bian liang ding yi
  Private XmlDoc,XmlHttp
  Private MessageCode,SysKey,XmlPath
  Private m_GetXmlDoc,m_url
  Private m_XmlDocAccept
  Rem chu shi hua
  Private Sub Class_Initialize()
  On Error Resume Next
  MessageCode = ""
  XmlPath = ""
  Set XmlDoc = Server.CreateObject("msxml2.FreeThreadedDOMDocument.3.0")
  XmlDoc.ASYNC = False
  End Sub
  Rem xiao hui dui xiang
  Private Sub Class_Terminate()
  If IsObject(XmlDoc) Then Set XmlDoc = Nothing
  If IsObject(m_XmlDocAccept) Then Set m_XmlDocAccept = Nothing
  If IsObject(m_GetXmlDoc) Then Set m_GetXmlDoc = Nothing
  End Sub
  ' gong gong shu xing ding yi kai shi --------------------------
  Rem cuo wu xin xi
  Public Property Get Message()
  Message = MessageCode
  End Property
  Rem fa song xml de di zhi
  Public Property Let URL(str)
  m_url = str
  End Property
  ' gong gong shu xing ding yi jie shu --------------------------
  ' si you guo cheng 、 fang fa kai shi --------------------------
  Rem jia zai xml
  Private Sub LoadXmlData()
  If XmlPath <> "" Then
   If Not XmlDoc.Load(XmlPath) Then
   XmlDoc.LoadXml "<?xml version=""1.0"" encoding=""gb2312""?><root/>"
   End If
  Else
   XmlDoc.LoadXml "<?xml version=""1.0"" encoding=""gb2312""?><root/>"
  End If
  End Sub
  Rem zi fu zhuan hua
  Private Function AnsiToUnicode(ByVal str)
  Dim i, j, c, i1, i2, u, fs, f, p
  AnsiToUnicode = ""
  p = ""
  For i = 1 To Len(str)
   c = Mid(str, i, 1)
   j = AscW(c)
   If j < 0 Then
   j = j + 65536
   End If
   If j >= 0 And j <= 128 Then
   If p = "c" Then
   AnsiToUnicode = " " & AnsiToUnicode
   p = "e"
   End If
   AnsiToUnicode = AnsiToUnicode & c
   Else
   If p = "e" Then
   AnsiToUnicode = AnsiToUnicode & " "
   p = "c"
   End If
   AnsiToUnicode = AnsiToUnicode & ("&#" & j & ";")
   End If
  Next
  End Function
  Rem zi fu zhuan hua
  Private Function strAnsi2Unicode(asContents)
  Dim len1,i,varchar,varasc
  strAnsi2Unicode = ""
  len1=LenB(asContents)
  If len1=0 Then Exit Function
   For i=1 to len1
   varchar=MidB(asContents,i,1)
   varasc=AscB(varchar)
   If varasc > 127 Then
   If MidB(asContents,i+1,1)<>"" Then
   strAnsi2Unicode = strAnsi2Unicode & chr(ascw(midb(asContents,i+1,1) & varchar))
   End If
   i=i+1
   Else
   strAnsi2Unicode = strAnsi2Unicode & Chr(varasc)
   End If
  Next
  End Function
  Rem wang wen jian zhong zhui jia zi fu
  Private Sub WriteStringToFile(filename,str)
  On Error Resume Next
  Dim fs,ts
  Set fs= createobject("script_ing.filesystemobject")
  If Not IsObject(fs) Then Exit Sub
  Set ts=fs.OpenTextFile(Server.MapPath(filename),8,True)
  ts.writeline(str)
  ts.close
  Set ts=Nothing
  Set fs=Nothing
  End Sub
  ' si you guo cheng 、 fang fa jie shu --------------------------
  ' gong gong fang fa kai shi --www.devdao.com------------------------
  ''''''''''' fa song xml bu fen kai shi
  Rem cong wai bu xml wen jian tian chong XmlDoc dui xiang
  Public Sub LoadXmlFromFile(path)
  XmlPath = Server.MapPath(path)
  LoadXmlData()
  End Sub
  Rem yong zi fu chuan tian chong XmlDoc dui xiang
  Public Sub LoadXmlFromString(str)
  XmlDoc.LoadXml str
  End Sub
  Rem she zhi node de shen shu ru NodeValue "appID",AppID,1,False
  '--------------------------------------------------
  ' shen shu :
  'NodeName jie dian ming
  'NodeText zhi
  'NodeType bao cun lei xing [text=0,cdata=1]
  'blnEncode shi fou bian ma [true,false]
  '--------------------------------------------------
  Public Sub NodeValue(Byval NodeName,Byval NodeText,Byval NodeType ,Byval blnEncode)
  Dim ChildNode,CreateCDATASection
  NodeName = Lcase(NodeName)
  If XmlDoc.documentElement.selectSingleNode(NodeName) is nothing Then
   Set ChildNode = XmlDoc.documentElement.appendChild(XmlDoc.createNode(1,NodeName,""))
  Else
   Set ChildNode = XmlDoc.documentElement.selectSingleNode(NodeName)
  End If
  If blnEncode = True Then
   NodeText = AnsiToUnicode(NodeText)
  End If
  If NodeType = 1 Then
   ChildNode.Text = ""
   Set CreateCDATASection = XmlDoc.createCDATASection(Replace(NodeText,"]]>","]]&gt;"))
   ChildNode.appendChild(createCDATASection)
  Else
   ChildNode.Text = NodeText
  End If
  End Sub
  '--------------------------------------------------
  ' huo qu fa song bao XML zhong jie dian de zhi
  ' shen shu :
  'Str jie dian ming
  '--------------------------------------------------
  Public Property Get XmlNode(Byval Str)
  If XmlDoc.documentElement.selectSingleNode(Str) is Nothing Then
   XmlNode = "Null"
  Else
   XmlNode = XmlDoc.documentElement.selectSingleNode(Str).text
  End If
  End Property
  '--------------------------------------------------
  ' huo qu fan hui XML shu ju dui xiang
  ' li :
  ' dang GetXmlData bu wei NULL shi ,GetXmlData wei XML dui xiang
  '--------------------------------------------------
  Public Property Get GetXmlData()
  Set GetXmlData = m_GetXmlDoc
  End Property
  '--------------------------------------------------
  ' fa song xml bao
  '--------------------------------------------------
  Public Sub SendHttpData()
  Dim i,GetXmlDoc,LoadAppid
  Set Xmlhttp = Server.CreateObject("MSXML2.ServerXMLHTTP.3.0")
  Set GetXmlDoc = Server.CreateObject("msxml2.FreeThreadedDOMDocument.3.0") ' fan hui xml bao
   XmlHttp.Open "POST", m_url, false
   XmlHttp.SetRequestHeader "content-type", "text/xml"
   XmlHttp.Send XmlDoc
   'Response.Write strAnsi2Unicode(xmlhttp.responseBody)
   If GetXmlDoc.load(XmlHttp.responseXML) Then
   Set m_GetXmlDoc = GetXmlDoc
   Else
   MessageCode = " qing qiu shu ju cuo wu !"
   Exit Sub
   End If
  Set GetXmlDoc = Nothing
  Set XmlHttp = Nothing
  End Sub
  
  
  '--------------------------------------------------
  ' da yin fa song qing qiu XML shu ju
  '--------------------------------------------------
  Public Sub PrintSendXmlData()
  Response.Clear
  Response.ContentType = "text/xml"
  Response.CharSet = "gb2312"
  Response.Expires = 0
  Response.Write "<?xml version=""1.0"" encoding=""gb2312""?>"&vbNewLine
  Response.Write XmlDoc.documentElement.XML
  End Sub
  '--------------------------------------------------
  ' da yin fan hui XML shu ju
  '--------------------------------------------------
  Public Sub PrintGetXmlData()
  Response.Clear
  Response.ContentType = "text/xml"
  Response.CharSet = "gb2312"
  Response.Expires = 0
  If IsObject(m_GetXmlDoc) Then
   Response.Write "<?xml version=""1.0"" encoding=""gb2312""?>"&vbNewLine
   Response.Write m_GetXmlDoc.documentElement.XML
  Else
   Response.Write "<?xml version=""1.0"" encoding=""gb2312""?><root></root>"
  End If
  End Sub
  Rem bao cun fa song qing qiu xml shu ju dao wen jian , wen jian ming wei sendxml_ ri qi .txt
  Public Sub SaveSendXmlDataToFile()
  Dim filename,str
  filename = "sendxml_" & DateValue(now) & ".txt"
  str = ""
  str = str & ""& Now() & vbNewLine
  str = str & "---------------------------------------------"& vbNewLine
  str = str & "<?xml version=""1.0"" encoding=""gb2312""?>" & vbNewLine
  str = str & XmlDoc.documentElement.XML & vbNewLine
  str = str & "---------------------------------------------"& vbNewLine
  str = str & vbNewLine & vbNewLine & vbNewLine
  WriteStringToFile filename,str
  End Sub
  Rem bao cun fan hui XML shu ju dao wen jian , wen jian ming wei getxml_ ri qi .txt
  Public Sub SaveGetXmlDataToFile()
  Dim filename,str
  filename = "getxml_" & DateValue(now) & ".txt"
  str = ""
  str = str & ""& Now() & vbNewLine
  str = str & "---------------------------------------------"& vbNewLine
  If IsObject(m_GetXmlDoc) Then
   str = str & "<?xml version=""1.0"" encoding=""gb2312""?>" & vbNewLine
   str = str & m_GetXmlDoc.documentElement.XML
  Else
   str = str & "<?xml version=""1.0"" encoding=""gb2312""?>" & vbNewLine & "<root>" & vbNewLine & "</root>"
  End If
  str = str & vbNewLine
  str = str & "---------------------------------------------"& vbNewLine
  str = str & vbNewLine & vbNewLine & vbNewLine
  WriteStringToFile filename,str
  End Sub
  
  '--------------------------------------------------
  ' huo qu fan hui xml de jie dian xin xi
  'XmlClassObj.GetSingleNode("//msg")
  '--------------------------------------------------
  Public Function GetSingleNode(nodestring)
  If IsObject(m_GetXmlDoc) Then
   GetSingleNode = m_GetXmlDoc.documentElement.selectSingleNode(nodestring).text
  Else
   GetSingleNode = ""
  End If
  End Function
  '''''''''''''''''' fa song xml bu fen jie shu
  
  '''''''''''''''''' jie shou xml bu fen kai shi
  '--------------------------------------------------
  ' jie shou XML bao , cuo wu xin xi tong guo Message dui xiang huo qu
  '--------------------------------------------------
  Public Function AcceptHttpData()
  Dim XMLdom
  Set XMLdom = Server.CreateObject("Microsoft.XMLDOM")
  XMLdom.Async = False
  XMLdom.Load(Request)
  If XMLdom.parseError.errorCode <> 0 Then
   MessageCode = " bu neng zheng que jie shou shu ju " & "Descript_ion: " & XMLdom.parseError.reason & "<br>Line: " & XMLdom.parseError.Line
   Set m_XmlDocAccept = Null
  Else
   Set m_XmlDocAccept = XMLdom
  End If
  End Function
  '--------------------------------------------------
  ' fan hui jie shou XML bao jie dian xin xi
  'XmlClassObj.GetSingleNode("//msg")
  '--------------------------------------------------
  Public Function AcceptSingleNode(nodestring)
  If IsObject(m_XmlDocAccept) Then
   AcceptSingleNode = m_XmlDocAccept.documentElement.selectSingleNode(nodestring).text
  Else
   AcceptSingleNode = ""
  End If
  End Function
  '--------------------------------------------------
  ' da yin jie shou duan jie shou dao de XML shu ju
  '--------------------------------------------------
  Public Sub PrintAcceptXmlData()
  Response.Clear
  Response.ContentType = "text/xml"
  Response.CharSet = "gb2312"
  Response.Expires = 0
  If IsObject(m_XmlDocAccept) Then
   Response.Write "<?xml version=""1.0"" encoding=""gb2312""?>"&vbNewLine
   Response.Write m_XmlDocAccept.documentElement.XML
  Else
   Response.Write "<?xml version=""1.0"" encoding=""gb2312""?><root></root>"
  End If
  End Sub
  Rem bao cun jie shou de XML bao shu ju dao wen jian , wen jian ming wei acceptxml_ ri qi .txt
  Public Sub SaveAcceptXmlDataToFile()
  Dim filename,str
  filename = "acceptxml_" & DateValue(now) & ".txt"
  str = ""
  str = str & ""& Now() & vbNewLine
  str = str & "---------------------------------------------"& vbNewLine
  If IsObject(m_XmlDocAccept) Then
   str = str & "<?xml version=""1.0"" encoding=""gb2312""?>" & vbNewLine
   str = str & m_XmlDocAccept.documentElement.XML
  Else
   str = str & "<?xml version=""1.0"" encoding=""gb2312""?>" & vbNewLine & "<root>" & vbNewLine & "</root>"
  End If
  str = str & vbNewLine
  str = str & "---------------------------------------------"& vbNewLine
  str = str & vbNewLine & vbNewLine & vbNewLine
  WriteStringToFile filename,str
  End Sub
  '''''''''''''''''' jie shou xml bu fen jie shu
  Rem bao cun tiao shi shu ju dao wen jian , wen jian ming wei debugnote_ ri qi .txt
  Public Sub SaveDebugStringToFile(debugstr)
  Dim filename,str
  filename = "debugnote_" & DateValue(now) & ".txt"
  str = ""
  str = str & ""& Now() & vbNewLine
  str = str & "---------------------------------------------"& vbNewLine
  str = str & debugstr & vbNewLine
  str = str & "---------------------------------------------"
  str = str & vbNewLine & vbNewLine & vbNewLine
  WriteStringToFile filename,str
  End Sub
  ' gong gong fang fa jie shu --------------------------
  End Class
  %>
  filemd5fun.asp
  <!--#Include File="xmlcls.asp"-->
  <%
  Rem qu de wen jian de md5, shen shu wei wen jian ming
  Function GetFileMD5(filename)
  Const Apisysno = "k8n6g2b0m1a6b0f6e8" ' jie kou de Key zhi , fang zhi bei fei fa shi yong jie kou ying gai bao chi yi zhi
  Dim XmlClassObj
  Set XmlClassObj = new XmlClass ' chuang jian dui xiang
  XmlClassObj.LoadXmlFromString("<?xml version=""1.0"" encoding=""gb2312""?><root/>") ' yong xml zi fu tian chong XMLDOC dui xiang , yong lai fa song xml
  XmlClassObj.URL = "http://www.shouji138.com/aspnet2/FileMD5.aspx" ' she zhi xiang ying de url, zhe li ying gai gai cheng ni de wang zhi
  Rem xml ge shi
  Rem "<?xml version="1.0" encoding="gb2312"?>
  Rem <root>
  Rem <sysno></sysno>
  Rem <apiaction></apiaction>
  Rem <filename></filename>
  Rem </root>
  XmlClassObj.NodeValue "sysno",Apisysno,0,False ' jie kou de Key zhi , fang zhi bei fei fa shi yong
  XmlClassObj.NodeValue "apiaction","createfilemd5",0,False ' jie kou de xiang ying dong zuo , yong yu ding yi yi ge jie kou yong yu duo zhong yong tu
  XmlClassObj.NodeValue "filename",filename,0,False ' wen jian lu jing he wen jian ming , yong xiang dui lu jing
  'XmlClassObj.SaveSendXmlDataToFile() ' jiang fa song de xml shu ju ku bao cun ru txt wen jian , yong yu tiao shi zhi yong
  XmlClassObj.SendHttpData() ' fa song xml shu ju
  'XmlClassObj.SaveGetXmlDataToFile() ' bao cun jie shou dao de xml shu ju
  Rem chu li jie guo
  Dim message,status
  status = XmlClassObj.GetSingleNode("//status") ' xian shi zhuang tai , ru guo wei OK ze biao shi cheng gong , fou ze you cuo wu fa sheng
  message = XmlClassObj.GetSingleNode("//message") ' xian shi qu dao de MD5 zhi , ru guo status bu wei OK, ze message wei cuo wu xin xi
  Set XmlClassObj = Nothing
  If status = "OK" Then
  GetFileMD5 = message
  Else
  GetFileMD5 = ""
  End If
  End Function
  %>
  test.asp
  <!--#Include File="filemd5fun.asp"-->
  <%
  Response.Write "web.config de md5 zhi shi :" & GetFileMD5("web.config") & "<br />"
  Response.Write "files/logo-yy.gif de md5 zhi shi :" & GetFileMD5("files/logo-yy.gif") & "<br />"
  Response.Write "xmlcls.asp de md5 zhi shi :" & GetFileMD5("xmlcls.asp") & "<br />"
  %>
  .net duan dai ma :
  MD5.cs
  using System;
  using System.Collections.Generic;
  using System.Text;
  using System.IO;
  namespace Winsteps.FileMD5
  {
   public class MD5
   {
   public static string md5_hash(string path)
   {
   try
   {
   FileStream get_file = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read);
   System.Security.Cryptography.MD5CryptoServiceProvider get_md5 = new System.Security.Cryptography.MD5CryptoServiceProvider();
   byte[] hash_byte = get_md5.ComputeHash(get_file);
   string resule = System.BitConverter.ToString(hash_byte);
   resule = resule.Replace("-", "");
   return resule;
   }
   catch (Exception e)
   {
   return e.Message;
   }
   }
   }
  }
  FileMD5.aspx
  <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FileMD5.aspx.cs" Inherits="Winsteps.FileMD5.FileMD5" %>
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml" >
  <head runat="server">
   <title> shou ji zhu ti wang :http://www.shouji138.com</title>
  </head>
  <body>
   <form id="form1" runat="server">
   <div>
  
   </div>
   </form>
  </body>
  </html>
  FileMD5.aspx.cs
  using System;
  using System.Data;
  using System.Configuration;
  using System.Collections;
  using System.Web;
  using System.Web.Security;
  using System.Web.UI;
  using System.Web.UI.WebControls;
  using System.Web.UI.WebControls.WebParts;
  using System.Web.UI.HtmlControls;
  using System.Xml;
  using System.Configuration;
  namespace Winsteps.FileMD5
  {
   public partial class FileMD5 : System.Web.UI.Page
   {
   protected void Page_Load(object sender, EventArgs e)
   {
   string sysno = "11111";
   string status = "False";
   string message = " wei zhi ding de cuo wu ";
   string net2sysno = ConfigurationManager.AppSettings["sysno"];
   XmlDocument doc = new XmlDocument();
   try
   {
  
   doc.Load(Request.InputStream);
   sysno = doc.SelectSingleNode("//sysno").InnerText.Trim();
   if (net2sysno != sysno)
   {
   message = " fei fa shi yong !";
   }
   else
   {
   string filename = Server.MapPath(doc.SelectSingleNode("//filename").InnerText.Trim());
   message = MD5.md5_hash(filename);
   status = "OK";
   }
   }
   catch(Exception ex)
   {
   message = ex.Message;
   }
   finally
   {
   if (doc != null)
   doc = null;
   }
   Response.Clear(); // qing chu html zi fu
   Response.ContentType = "text/xml";
   Response.Charset = "GB2312";// ru guo xml zi fu chuan zhong bao han zhong wen
   Response.Write("<?xml version=\"1.0\" encoding=\"GB2312\"?>");
   Response.Write("<root>");
   Response.Write(" <status>" + status + "</status>");
   Response.Write(" <message>" + message + "</message>");
   Response.Write("</root>");
   Response.End();
   }
   }
  }
  Web.config
  <?xml version="1.0" encoding="utf-8"?>
  <configuration>
  <appSettings>
   <add key="sysno" value="k8n6g2b0m1a6b0f6e8"></add>
  </appSettings>
  <system.web>
   <httpRuntime executionTimeout="3600" maxRequestLength="1048576"/>
   <compilation debug="true" defaultLanguage="c#" />
   <customErrors mode="Off" />
   <identity impersonate="true"/>
   <authentication mode="Forms">
   <forms name="forums" path="/" loginUrl="Login.aspx" protection="All" timeout="40">
   </forms>
   </authentication>
   <pages validateRequest="false"></pages>
   <globalization requestEncoding="gb2312" responseEncoding="gb2312" culture="zh-CN" uiCulture="zh-CN"/>
  </system.web>
  </configuration>
  web.config de sysno yao gen filemd5fun.asp li mian de Apisysno bao chi yi zhi , ju ti ying yong shi ying gai yao ba zhe ge key gai cheng ni zi ji de zhi lai bao zheng an quan 。
  yan shi di zhi :http://www.shouji138.com/aspnet2/filemd5.asp
  dai ma sui ran chang , dan shi yuan li jian dan ,asp fa song xml shu ju gei asp.net(xml zhong bao han le yao md5 de wen jian ming )->asp.net jie shou xml dui wen jian jin xing md5->asp.net jiang jie guo tong guo xml fan hui gei asp(xml zhong bao han le huo qu dao de md5 zhi )->asp huo qu fan hui de xml, jie xi chu md5 zhi 。
  ying yong fan wei :
  1. zai liang ge xi tong zhi jian chuan song wen jian shi , ke yi zai chuan song qian jin xing wen jian md5, chuan song hou jin xing wen jian md5, jian cha liang zhi shi fou xiang deng , ru guo xiang deng ze biao shi zai chuan song guo cheng zhong mei you bei xiu gai 。
  2. zuo shang chuan xi tong zhong , ru guo yao qiu bu neng shang chuan tong wen jian de hua , ke yi zai shang chuan zhi hou de wen jian jin xing md5 cun ru shu ju ku zhong , zhe yang xia ci shang chuan tong yang wen jian , ze md5 hui xiang tong , ju jue shang chuan 。
  3. zai sou suo yin qing 、 xun lei ben b2b ruan jian zhong , dui wen jian md5, ju you xiang tong md5 de wen jian bei ren wei shi xiang tong wen jian , er bu guan wen jian ming shi fou xiang tong , ke yi cong duo ge yuan lai fen xiang wen jian 。
  4. qi ta ying yong 。。。。。
  er 、asp tong guo COM zu jian shi xian md5( xu yao zai fu wu qi shang zhu ce zu jian )
  zhu ce yi ge asp de wen jian md5 zu jian , xia zai di zhi :http://www.shouji138.com/aspnet2/files/aspmd5.rar
  ran hou jiang PARmf.dll wen jian kao bei dao fu wu qi de c:\WINDOWS\system32 mu lu , yun xing regsvr32 parmf.dll jin xing zhu ce , chong qi IIS。
  tiao yong dai ma :
  <%
  Set DelphiASPObj = Server.CreateObject("PARmf.md5file")
   DelphiASPObj.in_path=Server.Mappath("Web.config") ' wen jian lu jing
   Response.Write "web.config de md5 zhi shi :" & DelphiASPObj.get_path_md5 & "<br />"
   Set DelphiASPObj=nothing
  %>
  san 、 liang zhong fang shi huo qu wen jian md5 de dui bi
  di yi zhong fang fa tong guo yu asp.net cheng xu jiao hu xml shu ju lai de dao wen jian de md5, xu yao fu wu qi zhi chi asp.net, yi ban de xu ni zhu ji dou ti gong asp.net huan jing , dan shi jia ge gao dian ;
  di er zhong fang fa tong guo zhu ce COM zu jian shi xian , xu yao you fu wu qi de quan xian , dui yu yong you fu wu qi de bi jiao he shi 。
  ling wai di yi zhong fang shi de zhe zhong jiao hu fang fa shi de asp ju you geng da de ling huo xing , ke yi ying yong zai 2 tai bu tong de fu wu qi shang mian jin xing shu ju jiao hu , ke guang fan ying yong yu ge zhong yi gou ping tai 。
  si 、 xia zai di zhi
  qing dao ou de xiao zhan , shou ji zhu ti wang cha kan yan shi he xia zai cheng xu bao
  yan shi di zhi :http://www.shouji138.com/aspnet2/filemd5.asp
  cheng xu xia zai da bao xia zai :http://www.shouji138.com/aspnet2/files/FileMD5.rar
  asp de wen jian md5 zu jian :http://www.shouji138.com/aspnet2/files/aspmd5.rar原文】【汉音对照
 
 
 
 
 
 
 
 
 
日版宠物情人插曲《Winding Road》歌词

日版宠物情人2017的插曲,很带节奏感,日语的,女生唱的。 最后听见是在第8集的时候女主手割伤了,然后男主用嘴帮她吸了一下,插曲就出来了。 歌手:Def...

兄弟共妻,我成了他们夜里的美食

老钟家的两个儿子很特别,就是跟其他的人不太一样,魔一般的执着。兄弟俩都到了要结婚的年龄了,不管自家老爹怎么磨破嘴皮子,兄弟俩说不娶就不娶,老父母为兄弟两操碎了心...

如何磨出破洞牛仔裤?牛仔裤怎么剪破洞?

把牛仔裤磨出有线的破洞 1、具体工具就是磨脚石,下面垫一个硬物,然后用磨脚石一直磨一直磨,到把那块磨薄了,用手撕开就好了。出来的洞啊很自然的。需要猫须的话调几...

我就是扫描下图得到了敬业福和爱国福

先来看下敬业福和爱国福 今年春节,支付宝再次推出了“五福红包”活动,表示要“把欠大家的敬业福都还给大家”。 今天该活动正式启动,和去年一样,需要收集“五福”...

冰箱异味产生的原因和臭味去除的方法

有时候我们打开冰箱就会闻到一股异味,冰箱里的这种异味是因为一些物质发出的气味的混合体,闻起来让人恶心。 产生这些异味的主要原因有以下几点。 1、很多人有这种习...

 
 
wang shang asp jia mi zi fu de MD5 hen duo , ye hen pu bian , dan shi dui wen jian jin xing md5 de que hen shao , yin wei shou dao asp yu yan ben shen de xian zhi 。 wo men zhi dao zi fu chuan de md5 ke yi dui ming wen jin xing bu ke ni de jia mi , cong er bao zheng shu ju chu cun huo zhe chuan song de an quan xing 。 tong yang de , dui wen jian jin xing md5 jia mi ye shi wei le bao zheng zai wang luo chuan song shi bu bei xiu gai he xiao yan , ling wai huan you yi ge yong tu jiu shi zai ge ren zhan dian li mian de ying yong : ke yi bao zheng shang chuan de tu pian huo wen jian ju you wei yi xing 。 yuan li shi , shang chuan dao fu wu qi zhi hou , tong shi zai shu ju ku zhong ji lu gai shang chuan wen jian de md5 zhi , zhe yang zai xia ci chuan tong yang wen jian de shi hou , ke yi tong guo cha xun shu ju ku shi fou shi xiang tong de wen jian ,md5 zhi xiang tong , wo men jiu ren wei ta shi xiang tong de wen jian ,md5 zhi jiu shi wen jian de “ shen fen zheng ”, qi shi bai du ye you zhe fang mian de ying yong , zai bai du sou suo tu pian , dian kai tu pian hou , you shi hou hui chu xian “ nin huan ke yi dian ji yi xia lian jie cha kan dao zhe zhang tu pian :XXX wang zhi ”, yuan li ye shi yi yang , dui wen jian jin xing md5。 fei hua shao shuo , kai shi zheng wen 。 yi 、asp tong guo xml jiao hu fang shi tiao yong .Net cheng xu shi xian wen jian md5 asp you yu ben shen yu yan de xian zhi , wu fa shi xian wen jian de md5, dan shi .net que ke yi , na shi bu shi ke yi tong guo .net dui wen jian jin xing md5, ran hou fa song xin xi gei asp jie shou , zhe yang jiu ke yi zuo dao asp de md5 le ne , da an shi ken ding de 。 zhe li she ji dao asp yu .net cheng xu jian de jiao hu , wo yi qian xie guo yi ge asp de lei :《asp chu li xml shu ju de fa song 、 jie shou lei 》, ke yi shang wo de bai du kong jian kan :[url=http://hi.baidu.com/manbutianmi/blog/item/dec182fc6db36587b801a0f6.html]http://hi.baidu.com/manbutianmi/blog/item/dec182fc6db36587b801a0f6.html[/url], jiang de shi asp chu li xml shu ju de fa song yu jie shou , ke yong yu ge zhong yi gou xi tong zhi jian API jie kou jian tong xun 。 ben wen zheng hao shi zhe ge lei de yi ge ying yong 。 dai ma ru xia : asp duan dai ma xmlcls.asp <% Rem chu li xml shu ju de fa song 、 jie shou lei '-------------------------------------------------- ' zhuan zai de shi hou bi xu bao liu ci ban quan xin xi ' zuo zhe :walkman ' wang zhi : shou ji zhu ti wang :http://www.shouji138.com ' ban ben :ver1.0 '-------------------------------------------------- Class XmlClass Rem bian liang ding yi Private XmlDoc,XmlHttp Private MessageCode,SysKey,XmlPath Private m_GetXmlDoc,m_url Private m_XmlDocAccept Rem chu shi hua Private Sub Class_Initialize() On Error Resume Next MessageCode = "" XmlPath = "" Set XmlDoc = Server.CreateObject("msxml2.FreeThreadedDOMDocument.3.0") XmlDoc.ASYNC = False End Sub Rem xiao hui dui xiang Private Sub Class_Terminate() If IsObject(XmlDoc) Then Set XmlDoc = Nothing If IsObject(m_XmlDocAccept) Then Set m_XmlDocAccept = Nothing If IsObject(m_GetXmlDoc) Then Set m_GetXmlDoc = Nothing End Sub ' gong gong shu xing ding yi kai shi -------------------------- Rem cuo wu xin xi Public Property Get Message() Message = MessageCode End Property Rem fa song xml de di zhi Public Property Let URL(str) m_url = str End Property ' gong gong shu xing ding yi jie shu -------------------------- ' si you guo cheng 、 fang fa kai shi -------------------------- Rem jia zai xml Private Sub LoadXmlData() If XmlPath <> "" Then If Not XmlDoc.Load(XmlPath) Then XmlDoc.LoadXml "<?xml version=""1.0"" encoding=""gb2312""?><root/>" End If Else XmlDoc.LoadXml "<?xml version=""1.0"" encoding=""gb2312""?><root/>" End If End Sub Rem zi fu zhuan hua Private Function AnsiToUnicode(ByVal str) Dim i, j, c, i1, i2, u, fs, f, p AnsiToUnicode = "" p = "" For i = 1 To Len(str) c = Mid(str, i, 1) j = AscW(c) If j < 0 Then j = j + 65536 End If If j >= 0 And j <= 128 Then If p = "c" Then AnsiToUnicode = " " & AnsiToUnicode p = "e" End If AnsiToUnicode = AnsiToUnicode & c Else If p = "e" Then AnsiToUnicode = AnsiToUnicode & " " p = "c" End If AnsiToUnicode = AnsiToUnicode & ("&#" & j & ";") End If Next End Function Rem zi fu zhuan hua Private Function strAnsi2Unicode(asContents) Dim len1,i,varchar,varasc strAnsi2Unicode = "" len1=LenB(asContents) If len1=0 Then Exit Function For i=1 to len1 varchar=MidB(asContents,i,1) varasc=AscB(varchar) If varasc > 127 Then If MidB(asContents,i+1,1)<>"" Then strAnsi2Unicode = strAnsi2Unicode & chr(ascw(midb(asContents,i+1,1) & varchar)) End If i=i+1 Else strAnsi2Unicode = strAnsi2Unicode & Chr(varasc) End If Next End Function Rem wang wen jian zhong zhui jia zi fu Private Sub WriteStringToFile(filename,str) On Error Resume Next Dim fs,ts Set fs= createobject("script_ing.filesystemobject") If Not IsObject(fs) Then Exit Sub Set ts=fs.OpenTextFile(Server.MapPath(filename),8,True) ts.writeline(str) ts.close Set ts=Nothing Set fs=Nothing End Sub ' si you guo cheng 、 fang fa jie shu -------------------------- ' gong gong fang fa kai shi --www.devdao.com------------------------ ''''''''''' fa song xml bu fen kai shi Rem cong wai bu xml wen jian tian chong XmlDoc dui xiang Public Sub LoadXmlFromFile(path) XmlPath = Server.MapPath(path) LoadXmlData() End Sub Rem yong zi fu chuan tian chong XmlDoc dui xiang Public Sub LoadXmlFromString(str) XmlDoc.LoadXml str End Sub Rem she zhi node de shen shu ru NodeValue "appID",AppID,1,False '-------------------------------------------------- ' shen shu : 'NodeName jie dian ming 'NodeText zhi 'NodeType bao cun lei xing [text=0,cdata=1] 'blnEncode shi fou bian ma [true,false] '-------------------------------------------------- Public Sub NodeValue(Byval NodeName,Byval NodeText,Byval NodeType ,Byval blnEncode) Dim ChildNode,CreateCDATASection NodeName = Lcase(NodeName) If XmlDoc.documentElement.selectSingleNode(NodeName) is nothing Then Set ChildNode = XmlDoc.documentElement.appendChild(XmlDoc.createNode(1,NodeName,"")) Else Set ChildNode = XmlDoc.documentElement.selectSingleNode(NodeName) End If If blnEncode = True Then NodeText = AnsiToUnicode(NodeText) End If If NodeType = 1 Then ChildNode.Text = "" Set CreateCDATASection = XmlDoc.createCDATASection(Replace(NodeText,"]]>","]]&gt;")) ChildNode.appendChild(createCDATASection) Else ChildNode.Text = NodeText End If End Sub '-------------------------------------------------- ' huo qu fa song bao XML zhong jie dian de zhi ' shen shu : 'Str jie dian ming '-------------------------------------------------- Public Property Get XmlNode(Byval Str) If XmlDoc.documentElement.selectSingleNode(Str) is Nothing Then XmlNode = "Null" Else XmlNode = XmlDoc.documentElement.selectSingleNode(Str).text End If End Property '-------------------------------------------------- ' huo qu fan hui XML shu ju dui xiang ' li : ' dang GetXmlData bu wei NULL shi ,GetXmlData wei XML dui xiang '-------------------------------------------------- Public Property Get GetXmlData() Set GetXmlData = m_GetXmlDoc End Property '-------------------------------------------------- ' fa song xml bao '-------------------------------------------------- Public Sub SendHttpData() Dim i,GetXmlDoc,LoadAppid Set Xmlhttp = Server.CreateObject("MSXML2.ServerXMLHTTP.3.0") Set GetXmlDoc = Server.CreateObject("msxml2.FreeThreadedDOMDocument.3.0") ' fan hui xml bao XmlHttp.Open "POST", m_url, false XmlHttp.SetRequestHeader "content-type", "text/xml" XmlHttp.Send XmlDoc 'Response.Write strAnsi2Unicode(xmlhttp.responseBody) If GetXmlDoc.load(XmlHttp.responseXML) Then Set m_GetXmlDoc = GetXmlDoc Else MessageCode = " qing qiu shu ju cuo wu !" Exit Sub End If Set GetXmlDoc = Nothing Set XmlHttp = Nothing End Sub '-------------------------------------------------- ' da yin fa song qing qiu XML shu ju '-------------------------------------------------- Public Sub PrintSendXmlData() Response.Clear Response.ContentType = "text/xml" Response.CharSet = "gb2312" Response.Expires = 0 Response.Write "<?xml version=""1.0"" encoding=""gb2312""?>"&vbNewLine Response.Write XmlDoc.documentElement.XML End Sub '-------------------------------------------------- ' da yin fan hui XML shu ju '-------------------------------------------------- Public Sub PrintGetXmlData() Response.Clear Response.ContentType = "text/xml" Response.CharSet = "gb2312" Response.Expires = 0 If IsObject(m_GetXmlDoc) Then Response.Write "<?xml version=""1.0"" encoding=""gb2312""?>"&vbNewLine Response.Write m_GetXmlDoc.documentElement.XML Else Response.Write "<?xml version=""1.0"" encoding=""gb2312""?><root></root>" End If End Sub Rem bao cun fa song qing qiu xml shu ju dao wen jian , wen jian ming wei sendxml_ ri qi .txt Public Sub SaveSendXmlDataToFile() Dim filename,str filename = "sendxml_" & DateValue(now) & ".txt" str = "" str = str & ""& Now() & vbNewLine str = str & "---------------------------------------------"& vbNewLine str = str & "<?xml version=""1.0"" encoding=""gb2312""?>" & vbNewLine str = str & XmlDoc.documentElement.XML & vbNewLine str = str & "---------------------------------------------"& vbNewLine str = str & vbNewLine & vbNewLine & vbNewLine WriteStringToFile filename,str End Sub Rem bao cun fan hui XML shu ju dao wen jian , wen jian ming wei getxml_ ri qi .txt Public Sub SaveGetXmlDataToFile() Dim filename,str filename = "getxml_" & DateValue(now) & ".txt" str = "" str = str & ""& Now() & vbNewLine str = str & "---------------------------------------------"& vbNewLine If IsObject(m_GetXmlDoc) Then str = str & "<?xml version=""1.0"" encoding=""gb2312""?>" & vbNewLine str = str & m_GetXmlDoc.documentElement.XML Else str = str & "<?xml version=""1.0"" encoding=""gb2312""?>" & vbNewLine & "<root>" & vbNewLine & "</root>" End If str = str & vbNewLine str = str & "---------------------------------------------"& vbNewLine str = str & vbNewLine & vbNewLine & vbNewLine WriteStringToFile filename,str End Sub '-------------------------------------------------- ' huo qu fan hui xml de jie dian xin xi 'XmlClassObj.GetSingleNode("//msg") '-------------------------------------------------- Public Function GetSingleNode(nodestring) If IsObject(m_GetXmlDoc) Then GetSingleNode = m_GetXmlDoc.documentElement.selectSingleNode(nodestring).text Else GetSingleNode = "" End If End Function '''''''''''''''''' fa song xml bu fen jie shu '''''''''''''''''' jie shou xml bu fen kai shi '-------------------------------------------------- ' jie shou XML bao , cuo wu xin xi tong guo Message dui xiang huo qu '-------------------------------------------------- Public Function AcceptHttpData() Dim XMLdom Set XMLdom = Server.CreateObject("Microsoft.XMLDOM") XMLdom.Async = False XMLdom.Load(Request) If XMLdom.parseError.errorCode <> 0 Then MessageCode = " bu neng zheng que jie shou shu ju " & "Descript_ion: " & XMLdom.parseError.reason & "<br>Line: " & XMLdom.parseError.Line Set m_XmlDocAccept = Null Else Set m_XmlDocAccept = XMLdom End If End Function '-------------------------------------------------- ' fan hui jie shou XML bao jie dian xin xi 'XmlClassObj.GetSingleNode("//msg") '-------------------------------------------------- Public Function AcceptSingleNode(nodestring) If IsObject(m_XmlDocAccept) Then AcceptSingleNode = m_XmlDocAccept.documentElement.selectSingleNode(nodestring).text Else AcceptSingleNode = "" End If End Function '-------------------------------------------------- ' da yin jie shou duan jie shou dao de XML shu ju '-------------------------------------------------- Public Sub PrintAcceptXmlData() Response.Clear Response.ContentType = "text/xml" Response.CharSet = "gb2312" Response.Expires = 0 If IsObject(m_XmlDocAccept) Then Response.Write "<?xml version=""1.0"" encoding=""gb2312""?>"&vbNewLine Response.Write m_XmlDocAccept.documentElement.XML Else Response.Write "<?xml version=""1.0"" encoding=""gb2312""?><root></root>" End If End Sub Rem bao cun jie shou de XML bao shu ju dao wen jian , wen jian ming wei acceptxml_ ri qi .txt Public Sub SaveAcceptXmlDataToFile() Dim filename,str filename = "acceptxml_" & DateValue(now) & ".txt" str = "" str = str & ""& Now() & vbNewLine str = str & "---------------------------------------------"& vbNewLine If IsObject(m_XmlDocAccept) Then str = str & "<?xml version=""1.0"" encoding=""gb2312""?>" & vbNewLine str = str & m_XmlDocAccept.documentElement.XML Else str = str & "<?xml version=""1.0"" encoding=""gb2312""?>" & vbNewLine & "<root>" & vbNewLine & "</root>" End If str = str & vbNewLine str = str & "---------------------------------------------"& vbNewLine str = str & vbNewLine & vbNewLine & vbNewLine WriteStringToFile filename,str End Sub '''''''''''''''''' jie shou xml bu fen jie shu Rem bao cun tiao shi shu ju dao wen jian , wen jian ming wei debugnote_ ri qi .txt Public Sub SaveDebugStringToFile(debugstr) Dim filename,str filename = "debugnote_" & DateValue(now) & ".txt" str = "" str = str & ""& Now() & vbNewLine str = str & "---------------------------------------------"& vbNewLine str = str & debugstr & vbNewLine str = str & "---------------------------------------------" str = str & vbNewLine & vbNewLine & vbNewLine WriteStringToFile filename,str End Sub ' gong gong fang fa jie shu -------------------------- End Class %> filemd5fun.asp <!--#Include File="xmlcls.asp"--> <% Rem qu de wen jian de md5, shen shu wei wen jian ming Function GetFileMD5(filename) Const Apisysno = "k8n6g2b0m1a6b0f6e8" ' jie kou de Key zhi , fang zhi bei fei fa shi yong jie kou ying gai bao chi yi zhi Dim XmlClassObj Set XmlClassObj = new XmlClass ' chuang jian dui xiang XmlClassObj.LoadXmlFromString("<?xml version=""1.0"" encoding=""gb2312""?><root/>") ' yong xml zi fu tian chong XMLDOC dui xiang , yong lai fa song xml XmlClassObj.URL = "[url=http://www.shouji138.com/aspnet2/FileMD5.aspx]http://www.shouji138.com/aspnet2/FileMD5.aspx[/url]" ' she zhi xiang ying de url, zhe li ying gai gai cheng ni de wang zhi Rem xml ge shi Rem "<?xml version="1.0" encoding="gb2312"?> Rem <root> Rem <sysno></sysno> Rem <apiaction></apiaction> Rem <filename></filename> Rem </root> XmlClassObj.NodeValue "sysno",Apisysno,0,False ' jie kou de Key zhi , fang zhi bei fei fa shi yong XmlClassObj.NodeValue "apiaction","createfilemd5",0,False ' jie kou de xiang ying dong zuo , yong yu ding yi yi ge jie kou yong yu duo zhong yong tu XmlClassObj.NodeValue "filename",filename,0,False ' wen jian lu jing he wen jian ming , yong xiang dui lu jing 'XmlClassObj.SaveSendXmlDataToFile() ' jiang fa song de xml shu ju ku bao cun ru txt wen jian , yong yu tiao shi zhi yong XmlClassObj.SendHttpData() ' fa song xml shu ju 'XmlClassObj.SaveGetXmlDataToFile() ' bao cun jie shou dao de xml shu ju Rem chu li jie guo Dim message,status status = XmlClassObj.GetSingleNode("//status") ' xian shi zhuang tai , ru guo wei OK ze biao shi cheng gong , fou ze you cuo wu fa sheng message = XmlClassObj.GetSingleNode("//message") ' xian shi qu dao de MD5 zhi , ru guo status bu wei OK, ze message wei cuo wu xin xi Set XmlClassObj = Nothing If status = "OK" Then GetFileMD5 = message Else GetFileMD5 = "" End If End Function %> test.asp <!--#Include File="filemd5fun.asp"--> <% Response.Write "web.config de md5 zhi shi :" & GetFileMD5("web.config") & "<br />" Response.Write "files/logo-yy.gif de md5 zhi shi :" & GetFileMD5("files/logo-yy.gif") & "<br />" Response.Write "xmlcls.asp de md5 zhi shi :" & GetFileMD5("xmlcls.asp") & "<br />" %> .net duan dai ma : MD5.cs using System; using System.Collections.Generic; using System.Text; using System.IO; namespace Winsteps.FileMD5 { public class MD5 { public static string md5_hash(string path) { try { FileStream get_file = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read); System.Security.Cryptography.MD5CryptoServiceProvider get_md5 = new System.Security.Cryptography.MD5CryptoServiceProvider(); byte[] hash_byte = get_md5.ComputeHash(get_file); string resule = System.BitConverter.ToString(hash_byte); resule = resule.Replace("-", ""); return resule; } catch (Exception e) { return e.Message; } } } } FileMD5.aspx <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FileMD5.aspx.cs" Inherits="Winsteps.FileMD5.FileMD5" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[url=http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd[/url]"> <html xmlns="[url=http://www.w3.org/1999/xhtml]http://www.w3.org/1999/xhtml[/url]" > <head runat="server"> <title> shou ji zhu ti wang :http://www.shouji138.com</title> </head> <body> <form id="form1" runat="server"> <div> </div> </form> </body> </html> FileMD5.aspx.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Xml; using System.Configuration; namespace Winsteps.FileMD5 { public partial class FileMD5 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { string sysno = "11111"; string status = "False"; string message = " wei zhi ding de cuo wu "; string net2sysno = ConfigurationManager.AppSettings["sysno"]; XmlDocument doc = new XmlDocument(); try { doc.Load(Request.InputStream); sysno = doc.SelectSingleNode("//sysno").InnerText.Trim(); if (net2sysno != sysno) { message = " fei fa shi yong !"; } else { string filename = Server.MapPath(doc.SelectSingleNode("//filename").InnerText.Trim()); message = MD5.md5_hash(filename); status = "OK"; } } catch(Exception ex) { message = ex.Message; } finally { if (doc != null) doc = null; } Response.Clear(); // qing chu html zi fu Response.ContentType = "text/xml"; Response.Charset = "GB2312";// ru guo xml zi fu chuan zhong bao han zhong wen Response.Write("<?xml version=\"1.0\" encoding=\"GB2312\"?>"); Response.Write("<root>"); Response.Write(" <status>" + status + "</status>"); Response.Write(" <message>" + message + "</message>"); Response.Write("</root>"); Response.End(); } } } Web.config <?xml version="1.0" encoding="utf-8"?> <configuration> <appSettings> <add key="sysno" value="k8n6g2b0m1a6b0f6e8"></add> </appSettings> <system.web> <httpRuntime executionTimeout="3600" maxRequestLength="1048576"/> <compilation debug="true" defaultLanguage="c#" /> <customErrors mode="Off" /> <identity impersonate="true"/> <authentication mode="Forms"> <forms name="forums" path="/" loginUrl="Login.aspx" protection="All" timeout="40"> </forms> </authentication> <pages validateRequest="false"></pages> <globalization requestEncoding="gb2312" responseEncoding="gb2312" culture="zh-CN" uiCulture="zh-CN"/> </system.web> </configuration> web.config de sysno yao gen filemd5fun.asp li mian de Apisysno bao chi yi zhi , ju ti ying yong shi ying gai yao ba zhe ge key gai cheng ni zi ji de zhi lai bao zheng an quan 。 yan shi di zhi :http://www.shouji138.com/aspnet2/filemd5.asp dai ma sui ran chang , dan shi yuan li jian dan ,asp fa song xml shu ju gei asp.net(xml zhong bao han le yao md5 de wen jian ming )->asp.net jie shou xml dui wen jian jin xing md5->asp.net jiang jie guo tong guo xml fan hui gei asp(xml zhong bao han le huo qu dao de md5 zhi )->asp huo qu fan hui de xml, jie xi chu md5 zhi 。 ying yong fan wei : 1. zai liang ge xi tong zhi jian chuan song wen jian shi , ke yi zai chuan song qian jin xing wen jian md5, chuan song hou jin xing wen jian md5, jian cha liang zhi shi fou xiang deng , ru guo xiang deng ze biao shi zai chuan song guo cheng zhong mei you bei xiu gai 。 2. zuo shang chuan xi tong zhong , ru guo yao qiu bu neng shang chuan tong wen jian de hua , ke yi zai shang chuan zhi hou de wen jian jin xing md5 cun ru shu ju ku zhong , zhe yang xia ci shang chuan tong yang wen jian , ze md5 hui xiang tong , ju jue shang chuan 。 3. zai sou suo yin qing 、 xun lei ben b2b ruan jian zhong , dui wen jian md5, ju you xiang tong md5 de wen jian bei ren wei shi xiang tong wen jian , er bu guan wen jian ming shi fou xiang tong , ke yi cong duo ge yuan lai fen xiang wen jian 。 4. qi ta ying yong 。。。。。 er 、asp tong guo COM zu jian shi xian md5( xu yao zai fu wu qi shang zhu ce zu jian ) zhu ce yi ge asp de wen jian md5 zu jian , xia zai di zhi :[url=http://www.shouji138.com/aspnet2/files/aspmd5.rar]http://www.shouji138.com/aspnet2/files/aspmd5.rar[/url] ran hou jiang PARmf.dll wen jian kao bei dao fu wu qi de c:\WINDOWS\system32 mu lu , yun xing regsvr32 parmf.dll jin xing zhu ce , chong qi IIS。 tiao yong dai ma : <% Set DelphiASPObj = Server.CreateObject("PARmf.md5file") DelphiASPObj.in_path=Server.Mappath("Web.config") ' wen jian lu jing Response.Write "web.config de md5 zhi shi :" & DelphiASPObj.get_path_md5 & "<br />" Set DelphiASPObj=nothing %> san 、 liang zhong fang shi huo qu wen jian md5 de dui bi di yi zhong fang fa tong guo yu asp.net cheng xu jiao hu xml shu ju lai de dao wen jian de md5, xu yao fu wu qi zhi chi asp.net, yi ban de xu ni zhu ji dou ti gong asp.net huan jing , dan shi jia ge gao dian ; di er zhong fang fa tong guo zhu ce COM zu jian shi xian , xu yao you fu wu qi de quan xian , dui yu yong you fu wu qi de bi jiao he shi 。 ling wai di yi zhong fang shi de zhe zhong jiao hu fang fa shi de asp ju you geng da de ling huo xing , ke yi ying yong zai 2 tai bu tong de fu wu qi shang mian jin xing shu ju jiao hu , ke guang fan ying yong yu ge zhong yi gou ping tai 。 si 、 xia zai di zhi qing dao ou de xiao zhan , shou ji zhu ti wang cha kan yan shi he xia zai cheng xu bao yan shi di zhi :[url=http://www.shouji138.com/aspnet2/filemd5.asp]http://www.shouji138.com/aspnet2/filemd5.asp[/url] cheng xu xia zai da bao xia zai :[url=http://www.shouji138.com/aspnet2/files/FileMD5.rar]http://www.shouji138.com/aspnet2/files/FileMD5.rar[/url] asp de wen jian md5 zu jian :[url=http://www.shouji138.com/aspnet2/files/aspmd5.rar]http://www.shouji138.com/aspnet2/files/aspmd5.rar[/url]
󰈣󰈤
  免责声明:本文仅代表作者个人观点,与王朝网络无关。王朝网络登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述,其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
可爱小魔女
夏日小桃红
琦吖囡半熟乖巧清新写真
天使的微笑
痞子的甘南日记
疑是银河落九天
雪域坝上四——纯美色
冬日恋歌——西城杨柳弄轻柔
 
>>返回首页<<
 
 
 为你推荐
 
 
 
 转载本文
 UBB代码 HTML代码
复制到剪贴板...
 
 热帖排行
 
 
 
 
 
©2005- 王朝网络 版权所有