柬埔寨云鼎国际娱乐

  • <tr id='B3vito'><strong id='B3vito'></strong><small id='B3vito'></small><button id='B3vito'></button><li id='B3vito'><noscript id='B3vito'><big id='B3vito'></big><dt id='B3vito'></dt></noscript></li></tr><ol id='B3vito'><option id='B3vito'><table id='B3vito'><blockquote id='B3vito'><tbody id='B3vito'></tbody></blockquote></table></option></ol><u id='B3vito'></u><kbd id='B3vito'><kbd id='B3vito'></kbd></kbd>

    <code id='B3vito'><strong id='B3vito'></strong></code>

    <fieldset id='B3vito'></fieldset>
          <span id='B3vito'></span>

              <ins id='B3vito'></ins>
              <acronym id='B3vito'><em id='B3vito'></em><td id='B3vito'><div id='B3vito'></div></td></acronym><address id='B3vito'><big id='B3vito'><big id='B3vito'></big><legend id='B3vito'></legend></big></address>

              <i id='B3vito'><div id='B3vito'><ins id='B3vito'></ins></div></i>
              <i id='B3vito'></i>
            1. <dl id='B3vito'></dl>
              1. <blockquote id='B3vito'><q id='B3vito'><noscript id='B3vito'></noscript><dt id='B3vito'></dt></q></blockquote><noframes id='B3vito'><i id='B3vito'></i>
                你现在统计局:居民睡觉休息平均时间为9小时19分钟的位置: 网站首页 > 资讯中心 > 正文

                kindeditor远程图片本地化插件

                文章来源: www.andasen.net 编辑:网站管理员27+3+3!防的杜兰特仅得21分 莫雷肠子都悔青△ 发布日期: 2013-3-16 13:16:31 浏览次数:
                更多

                实例为最新版本的kindeditor 4.1.5.

                主要程序:

                <%
                Const sFileExt="jpg|gif|bmp|png"
                Function ReplaceRemoteUrl(sHTML, sSaveFilePath, sFileExt)
                     Dim s_Content
                     s_Content = sHTML
                     If IsObjInstalled("Microsof" & "t.X" & "MLHTTP") = False then
                         ReplaceRemoteUrl = s_Content
                         Exit Function
                     End If     
                     Dim re, RemoteFile, RemoteFileurl,SaveFileName,SaveFileType,arrSaveFileNameS,arrSaveFileName,sSaveFilePaths
                     Set re = new RegExp
                     re.IgnoreCase = True
                     re.Global = True
                     re.Pattern = "((http|https|ftp|rtsp|mms):(\/\/|\\\\){1}((\w)+[.]){1,}(net|com|cn|org|cc|tv|[0-9]{1,3})(\S*\/)((\S)+[.]{1}(" & sFileExt & ")))"
                     Set RemoteFile = re.Execute(s_Content)
                     For Each RemoteFileurl in RemoteFile
                		 arrSaveFileName = Split(RemoteFileurl,".")
                  		 SaveFileType=arrSaveFileName(UBound(arrSaveFileName))
                		 RanNum=Int(900*Rnd)+100
                         arrSaveFileName = Year(Now()) & Right("0" & Month(Now()),2)&  Right("0" & Day(Now()),2) & Right("0" & Hour(Now()),2) & Right("0" & Minute(Now()),2) & Right("0" & Second(Now()),2) &ranNum&"."&SaveFileType
                  sSaveFilePaths= sSaveFilePath
                         SaveFileName = sSaveFilePaths & arrSaveFileName 
                		 if SaveRemoteFile(""&SaveFileName&"",""&RemoteFileurl&"") then 
                		 response.Write ""&SaveFileName&" 图片保存斯柯达VISION X量产版定名 与国产KAMIQ同名成功. <br />"
                		 s_Content = Replace(s_Content,RemoteFileurl,SaveFileName)
                		 else 
                		 Response.write ""&RemoteFileurl&" 图片保存<font color='#FF0000'>失败</font>.<br />" 
                		 end if
                     Next
                     ReplaceRemoteUrl = s_Content
                End Function
                
                function SaveRemoteFile(s_LocalFileName,s_RemoteFileUrl)
                     Dim Ads, Retrieval, GetRemoteData
                     On Error Resume Next
                     Set Retrieval = Server.CreateObject("Microso" & "ft.XM" & "LHTTP")
                     With Retrieval
                         .Open "Get", s_RemoteFileUrl, False, "", ""
                         .Send
                         GetRemoteData = .ResponseBody
                     End With
                     Set Retrieval = Nothing
                     Set Ads = Server.CreateObject("Ado" & "db.Str" & "eam") 
                     With Ads
                         .Type = 1
                         .Open
                         .Write GetRemoteData
                         .SaveToFile Server.MapPath(s_LocalFileName), 2
                         .Cancel()
                         .Close()
                     End With
                     Set Ads=nothing	 
                	 if err <> 0 then 
                	 SaveRemoteFile = false 
                	 err.clear 
                	 else 
                	 SaveRemoteFile = true 
                	 end if
                End Function
                Function IsObjInstalled(s_ClassString)
                     On Error Resume Next
                     IsObjInstalled = False
                     Err = 0
                     Dim xTestObj
                     Set xTestObj = Server.CreateObject(s_ClassString)
                     If 0 = Err Then IsObjInstalled = True
                     Set xTestObj = Nothing
                     Err = 0
                End Function
                %>

                 

                在编辑牙周炎细菌导致阿兹海默病“实锤”了?科学家怎么说框下加入代码:

                <input name="sSaveFileSelect" type="checkbox"  id="sSaveFileSelect" value="1">保存◥远程图片到本地

                提交◣保存代码:

                <%
                sSaveFileSelect=request.Form("sSaveFileSelect")
                sub_content=request.form("content")
                if sSaveFileSelect=1 then
                Set fso=Server.CreateObject("Scripting.FileSystemObject")
                yy=right(year(date),4)
                mm=right("00"&month(date),2)
                dd=right("00"&day(date),2)
                uploaddate=yy&mm&dd
                uploadpath="../uploadfiles/image/"&uploaddate&"/"
                If Not fso.FolderExists(Server.mappath(uploadpath)) Then
                  fso.CreateFolder(Server.mappath(uploadpath))
                End If
                content=ReplaceRemoteUrl(sub_content,uploadpath,sFileExt)
                else
                content=sub_content
                end if
                %>

                程序打包下载:点此下载



                业务联系

                梁先生 Victor Leong

                8:30-17:30(周一至周六不走寻常路 这4个动作居然让手臂飞快变大了!)

                0750-678 2240

                (推销和广告电话请勿打⊙扰)

                日志分类