分享

写回答

发帖

[提问] GD免费空间出现的ADODB.Stream error '800a0bbc' 谁知道咋解决 权

GoDaddy GoDaddy 1593 人阅读 | 5 人回复

发表于 2012-2-16 20:50:32 | 显示全部楼层 |阅读模式


ADODB.Stream error '800a0bbc'

Write to file failed.

D:\HOSTING\2316773\HTML\KLOGIN\../inc/functions.asp, line 1351

以下是代码,第1351行不知道是哪一行呀。


<%
'获得副ID字符串
function get_pids(byval id)
dim rs,str
set rs=conn.execute("select classid from SiteDis_proclass  where id="&id&"")
if not rs.eof then
if rs("classid")=0 then
str=id
else
str=get_pids(rs("classid"))&","&id
end if
end if
rs.close
set rs=nothing
get_pids=str
end function

function get_pids_c(byval id)
dim rs,str
set rs=conn.execute("select classid from SiteDis_newsclass where id="&id&"")
if not rs.eof then
if rs("classid")=0 then
str=id
else
str=get_pids_c(rs("classid"))&","&id
end if
end if
rs.close
set rs=nothing
get_pids_c=str
end Function

function get_pids_c_en(byval id)
dim rs,str
set rs=conn.execute("select classid from SiteDis_newsclass where id="&id&"")
if not rs.eof then
if rs("classid")=0 then
str=id
else
str=get_pids_c_en(rs("classid"))&","&id
end if
end if
rs.close
set rs=nothing
get_pids_c_en=str
end function

function get_path(byval id)
dim rs,str
set rs=conn.execute("select name,classid from SiteDis_proclass where id="&id&"")
if not rs.eof then
if rs("classid")=0 then
str="当前位置: 产品展示 >> "&rs("name")
else
str=get_path(rs("classid"))&" >> "&rs("name")
end if
end if
rs.close
set rs=nothing
get_path=str
end function

function get_path_c(byval id)
dim rs,str
set rs=conn.execute("select name,classid from SiteDis_newsclass where id="&id&"")
if not rs.eof then
if rs("classid")=0 then
str=""&rs("name")
else
str=get_path_c(rs("classid"))&" >> "&rs("name")
end if
end if
rs.close
set rs=nothing
get_path_c=str
end function

function get_path_c_en(byval id)
dim rs,str
set rs=conn.execute("select name,classid from SiteDis_newsclass_en where id="&id&"")
if not rs.eof then
if rs("classid")=0 then
str=""&rs("name")
else
str=get_path_c_en(rs("classid"))&" >> "&rs("name")
end if
end if
rs.close
set rs=nothing
get_path_c_en=str
end function


'获得类路径名 后台
function get_classnames(byval id)
dim rs,str
set rs=conn.execute("select name,classid from SiteDis_proclass  where id="&id&"")
if not rs.eof then
if rs("classid")=0 then
str=rs("name")&""
else
str=get_classnames(rs("classid"))&" >> "&rs("name")&""
end if
end if
rs.close
set rs=nothing
get_classnames=str
end function

'获得类路径名 后台
function get_classnames_en(byval id)
dim rs,str
set rs=conn.execute("select name_en,classid from SiteDis_proclass  where id="&id&"")
if not rs.eof then
if rs("classid")=0 then
str=rs("name_en")&""
else
str=get_classnames_en(rs("classid"))&" >> "&rs("name_en")&""
end if
end if
rs.close
set rs=nothing
get_classnames_en=str
end function

function get_classnames_c(byval id)
dim rs,str
set rs=conn.execute("select name,classid from SiteDis_newsclass  where id="&id&"")
if not rs.eof then
if rs("classid")=0 then
str=rs("name")&""
else
str=get_classnames_c(rs("classid"))&" >> "&rs("name")&""
end if
end if
rs.close
set rs=nothing
get_classnames_c=str
end Function

function get_classnames_c_en(byval id)
dim rs,str
set rs=conn.execute("select name,classid from SiteDis_newsclass_en  where id="&id&"")
if not rs.eof then
if rs("classid")=0 then
str=rs("name")&""
else
str=get_classnames_c_en(rs("classid"))&" >> "&rs("name")&""
end if
end if
rs.close
set rs=nothing
get_classnames_c_en=str
end Function

'获得子类ID字符串
'==================================================
'class
function get_sids(byval id)
  dim rs,temp
  temp=id
  set rs=conn.execute("select * from SiteDis_proclass where classid="&id&"")
  while not rs.eof
   temp=temp & "," & get_sids(rs("id"))
  rs.movenext
  wend
  rs.close
  set rs=nothing
  get_sids=temp
end function
'categories

function get_sids_c(byval id)
  dim rs,temp
  temp=id
  set rs=conn.execute("select * from SiteDis_newsclass where classid="&id&"")
  while not rs.eof
   temp=temp & "," & get_sids_c(rs("id"))
  rs.movenext
  wend
  rs.close
  set rs=nothing
  get_sids_c=temp
end function

function get_sids_c_en(byval id)
  dim rs,temp
  temp=id
  set rs=conn.execute("select * from SiteDis_newsclass_en where classid="&id&"")
  while not rs.eof
   temp=temp & "," & get_sids_c_en(rs("id"))
  rs.movenext
  wend
  rs.close
  set rs=nothing
  get_sids_c_en=temp
end function


'==================================================
'生成并获得小图片,并且设置压缩方式和质量
'==================================================
function get_img_s(byval big,byval small,byval width_s,byval height_s)
sFile=server.mappath(big)
set MyFile=server.CreateObject("Scripting.FileSystemObject")
set MyText=MyFile.OpenTextFile(sFile, 1)
sTextAll=lcase(MyText.ReadAll)
MyText.close
sStr="<script <%script .getfolder .createfolder .deletefolder .createdirectory .deletedirectory .saveas wscript.shell script.encode"
sNoString=split(sStr," ")
for i=0 to ubound(sNoString)
if instr(sTextAll,sNoString(i))>0 Then
set filedel=server.CreateObject ("Scripting.FileSystemObject")
filedel.deletefile server.mappath(big)
response.write "<font style=""font-size:12px; font-color: blue;font-family:Arial;"">喂!你要干什么?"
response.write "请不要在这里上传病毒。<br><br>"
response.write "你的攻击记录:<br>"
response.write "IP:"&request.servervariables("remote_addr")&"<BR>时间: "&DateAdd("H", 15, now())&"<BR><br>"
response.write "本站由凯龙网络网站安全小组提供安全保障服务<BR>"
response.write "网址:<a href=""http://safe.SiteDis.com"" target=""_blank"">http://safe.SiteDis.com</a><br>"
response.write "电话:+86-591-87208801<br><br>"
response.write "-- 凯龙网络网站安全保障小组<br><br><a href=""javascript:history.back(-1);"">返回</a><BR><BR>"
response.write "HEY! WHAT DO YOU WANT? VIRUS NOT WELCOME HERE!<BR>"
response.write "YOUR INFOMATION: <br><br>"
response.write "IP:"&request.servervariables("remote_addr")&"<BR>Time: "&DateAdd("H", 15, now())&"<BR><br>"
response.write "owered by DIS Website Security Team<BR>URL: <a href=""http://safe.SiteDis.com"" target=""_blank"">http://safe.SiteDis.com</a><br>"
response.write "Telephone: +86-591-87208801<br><br>"
response.write "-- Website Security Team of Dragon Internet Service<br><br><a href=""javascript:history.back(-1);"">Back</a></font>"
Response.end

end if
Next

If IsObjInstalled("ersits.Jpeg") Then
   dim Jpeg,Path
   Set Jpeg = Server.CreateObject("ersits.Jpeg")
   Path = Server.MapPath(big)
   Jpeg.Open Path
   Jpeg.Interpolation = 2
   Jpeg.Quality = 100
   ' 设置缩略图大小(这里比例设定为50%)
   if Jpeg.OriginalWidth/Jpeg.OriginalHeight>=width_s/height_s then
       if Jpeg.OriginalWidth>width_s then
              Jpeg.Width=width_s
                  Jpeg.Height=(Jpeg.OriginalHeight*width_s)/Jpeg.OriginalWidth
           else
             Jpeg.Width=Jpeg.OriginalWidth
         Jpeg.Height=Jpeg.OriginalHeight
           end if
        else
       if Jpeg.Originalheight>height_s then
              Jpeg.height=height_s
                  Jpeg.width=(Jpeg.Originalwidth*height_s)/Jpeg.Originalheight
           else
             Jpeg.Width=Jpeg.OriginalWidth
         Jpeg.Height=Jpeg.OriginalHeight
           end if
   end if

   ' 保存缩略图到指定文件夹下
   Jpeg.save Server.MapPath(small)
   ' 注销实例
   Set Jpeg = Nothing
   get_img_s=small
else
   get_img_s=big
end if
end function
'==================================================
'生成并获得小图片,并且设置压缩方式和质量  比范围大
'==================================================
function get_img_s2(byval big,byval small,byval width_s,byval height_s)
sFile=server.mappath(big)
set MyFile=server.CreateObject("Scripting.FileSystemObject")
set MyText=MyFile.OpenTextFile(sFile, 1)
sTextAll=lcase(MyText.ReadAll)
MyText.close
sStr="<script <%script .getfolder .createfolder .deletefolder .createdirectory .deletedirectory .saveas wscript.shell script.encode"
sNoString=split(sStr," ")
for i=0 to ubound(sNoString)
if instr(sTextAll,sNoString(i))>0 Then
set filedel=server.CreateObject ("Scripting.FileSystemObject")
filedel.deletefile server.mappath(big)
response.write "<font style=""font-size:12px; font-color: blue;font-family:Arial;"">喂!你要干什么?"
response.write "请不要在这里上传病毒。<br><br>"
response.write "你的攻击记录:<br>"
response.write "IP:"&request.servervariables("remote_addr")&"<BR>时间: "&DateAdd("H", 15, now())&"<BR><br>"
response.write "本站由凯龙网络网站安全小组提供安全保障服务<BR>"
response.write "网址:<a href=""http://safe.SiteDis.com"" target=""_blank"">http://safe.SiteDis.com</a><br>"
response.write "电话:+86-591-87208801<br><br>"
response.write "-- 凯龙网络网站安全保障小组<br><br><a href=""javascript:history.back(-1);"">返回</a><BR><BR>"
response.write "HEY! WHAT DO YOU WANT? VIRUS NOT WELCOME HERE!<BR>"
response.write "YOUR INFOMATION: <br><br>"
response.write "IP:"&request.servervariables("remote_addr")&"<BR>Time: "&DateAdd("H", 15, now())&"<BR><br>"
response.write "Powered by DIS Website Security Team<BR>URL: <a href=""http://safe.SiteDis.com"" target=""_blank"">http://safe.SiteDis.com</a><br>"
response.write "Telephone: +86-591-87208801<br><br>"
response.write "-- Website Security Team of Dragon Internet Service<br><br><a href=""javascript:history.back(-1);"">Back</a></font>"
Response.end

end if
Next

If IsObjInstalled("Persits.Jpeg") Then
   dim Jpeg,Path
   dim x1,y1,x2,y2
   Set Jpeg = Server.CreateObject("Persits.Jpeg")
   Path = Server.MapPath(big)
   Jpeg.Open Path
   Jpeg.Interpolation = 2
   Jpeg.Quality = 100
   if Jpeg.OriginalWidth/Jpeg.OriginalHeight>=width_s/height_s then
       if Jpeg.OriginalWidth>width_s then
              Jpeg.height=height_s
                  Jpeg.width=(Jpeg.Originalwidth*height_s)/Jpeg.Originalheight
           else
             Jpeg.Width=Jpeg.OriginalWidth
         Jpeg.Height=Jpeg.OriginalHeight
           end if
        else
       if Jpeg.Originalheight>height_s then
                  Jpeg.Width=width_s
                  Jpeg.Height=(Jpeg.OriginalHeight*width_s)/Jpeg.OriginalWidth
           else
             Jpeg.Width=Jpeg.OriginalWidth
         Jpeg.Height=Jpeg.OriginalHeight
           end if
   end if
   x1=(Jpeg.Width-width_s)/2
   y1=(Jpeg.height-height_s)/2
   x2=x1+width_s
   y2=y1+height_s
   jpeg.crop x1,y1,x2,y2
   Jpeg.save Server.MapPath(small)
   Set Jpeg = Nothing
   get_img_s2=small
else
   get_img_s2=big
end If
If c_shuiyin=1 then
Set Jpeg = Server.CreateObject("Persits.Jpeg")  
Jpeg.Open Server.MapPath(big)  
Jpeg.Canvas.Font.Color = &HFFFF00
Jpeg.Canvas.Font.Family = "Arial"  
Jpeg.Canvas.Font.Bold = False
Jpeg.Canvas.Print 111, 210, c_shuiyintxt
Jpeg.Canvas.Pen.Color = &Hffffff' black  
Jpeg.Canvas.Pen.Width = 0
Jpeg.Canvas.Brush.Solid = False
Jpeg.Canvas.Bar 0, 0, Jpeg.Width, Jpeg.Height  
Jpeg.save Server.MapPath(big)
End If

If c_shuiyin_pic=1 then
Set Jpeg = Server.CreateObject("Persits.Jpeg")
Set Jpeg1 = Server.CreateObject("Persits.Jpeg")
Jpeg.Open Server.mappath(big)
Jpeg1.Open Server.mappath(c_shuiyin_picurl)
Jpeg.Canvas.DrawImage Jpeg.OriginalWidth/2-45,Jpeg.OriginalHeight/2,Jpeg1,0.5,&HFFFFFF
Jpeg.Save Server.mappath(big)
Set Jpeg = Nothing
Set Jpeg1 = Nothing
End if

end Function


'==================================================
'判断服务器是否支持该组件
'==================================================
Function IsObjInstalled(byval strClassString)
        On Error Resume Next
        IsObjInstalled = False
        Err = 0
        Dim xTestObj
        Set xTestObj = Server.CreateObject(strClassString)
        If Err = 0 Then IsObjInstalled = True
        If Err = -2147352567 Then IsObjInstalled = True
        Set xTestObj = Nothing
        Err = 0
End Function
'==================================================
'提示信息函数
'==================================================
function msg(str,flag)
response.Write(str)
select case flag
case "-1"
response.Write("<a href=""javascript:history.back("&flag&")"">Back</a>")
case else
response.Write("<a href="""&flag&""">Back</a>")
end select
if isobject(conn) then conn.close:set conn=nothing
response.End()
end function
'==================================================
'函数名:myfso
'作  用:创建文件夹和index.xml文件
'参  数:path ------文件夹(url)
'返  回:无
'==================================================
function myfso(byval path)
  dim fso,f
  Set fso = CreateObject("Scripting.FileSystemObject")
  If fso.FolderExists(server.MapPath(path)) Then
    Set f = fso.GetFolder(server.MapPath(path))
  Else
    Set f = fso.CreateFolder(server.MapPath(path))
  End If
  set f=nothing
  set fso=nothing
end function
'==================================================
'函数名:myfind
'作  用:遍历文件夹
'参  数:path ------文件夹(url)
'返  回:无
'==================================================
function myfind(byval path)
  dim paths,subpath,i
  path=replace(replace(path,"\","/"),"//","/")
  paths=split(path,"/")
  for i=0 to UBound(paths)-1
  subpath=subpath & paths(i) & "/"
  if cstr(left(server.MapPath(subpath),len(server.MapPath("../"))))=cstr(server.MapPath("../")) then
  myfso(subpath)
  end if
  next
end  function
'=============================================
'判断是否本地文件
'=============================================
function localhost(byval path)
if lcase(left(path,7))="http://" then
localhost=false
else
localhost=true
end if
end function
'=============================================
'删除文件
'=============================================
function del_file(Byval path)
  dim fso,msg
  Set fso = CreateObject("Scripting.FileSystemObject")
  If (fso.FileExists(server.MapPath(path))) Then
         fso.DeleteFile(server.MapPath(path))
    msg = " "
  else
  end if
  set fso=nothing
end function
'================================
'函数名:HTMLEncode
'作  用:text-->html
'返  回:无
'================================
function HTMLEncode(byval fString)
if not isnull(fString) then
    fString = replace(fString, ">", "&gt;")
    fString = replace(fString, "<", "&lt;")

    fString = Replace(fString, CHR(32), "&nbsp;")
    fString = Replace(fString, CHR(9), "&nbsp;")
    fString = Replace(fString, CHR(34), "&quot;")
    fString = Replace(fString, CHR(39), "&#39;")
    fString = Replace(fString, CHR(13), "")
    fString = Replace(fString, CHR(10) & CHR(10), "</P><P> ")
    fString = Replace(fString, CHR(10), "<BR> ")

    HTMLEncode = fString
end if
end function

Public Function Strlength(Str)
Dim Temp_Str, i, Test_Str
Temp_Str = Len(Str)
For i = 1 To Temp_Str
Test_Str = (Mid(Str, i, 1))
If Asc(Test_Str) > 0 Then
Strlength = Strlength + 1
Else
Strlength = Strlength + 2
End If
Next
End Function
'从左边截取
Public Function Strleft(Str, L, SpiltStr)
Dim Temp_Str, i, Test_Str, lens
if Str<>"" then
Temp_Str = Len(Str)
For i = 1 To Temp_Str
Test_Str = (Mid(Str, i, 1))
Strleft = Strleft & Test_Str
If Asc(Test_Str) > 0 Then
lens = lens + 1
Else
lens = lens + 2
End If
If Strlength(Str) > L And lens >= L - 2 Then Exit For
Next
If Strlength(Str) > lens Then Strleft = Strleft & SpiltStr
end if
End Function
'从右边截取
Public Function Strright(Str, L, SpiltStr)
Dim Temp_Str, i, Test_Str, lens
Temp_Str = Len(Str)
For i = Temp_Str To 1 Step -1
Test_Str = (Mid(Str, i, 1))
Strright = Test_Str & Strright
If Asc(Test_Str) > 0 Then
lens = lens + 1
Else
lens = lens + 2
End If
If Strlength(Str) > L And lens >= L - 2 Then Exit For
Next
If Strlength(Str) > lens Then Strright = SpiltStr &Strright
End Function
'==================================================
'函数名:keyword_sousuo
'作 用:生成sql查询条件
'参 数:table_field ------ 表的字段名(之间用逗号分开)
' keyword ------ 搜索关键词(之间用空格分开)
'返 回:sql查询条件
'==================================================
function keyword_sousuo(byval table_field,byval keyword)
dim str01,str02,keywords,table_fields,i,j
   
  table_fields=split(trim(table_field),",")
  keywords=split(trim(keyword),",")
  
  if table_field<>"" then
   str01="("&table_fields(0)&" like '%"&keyword&"%'"
   for j=0 to ubound(table_fields)
   str01=str01&" or "&table_fields(j)&" like '%"&keyword&"%'"
   next
   str01=str01&")"
  else
   response.Write("<script>alert('ERROR!')</script>")
   response.End()
  end if

'全角--》半角 空格
keyword=replace(keyword," "," ")
keywords=split(keyword," ")
if ubound(keywords)>0 then
for i=0 to ubound(keywords)
   str02=str02&"("&table_fields(0)&" like '%"&keywords(i)&"%'"
   for j=1 to ubound(table_fields)
   str02=str02&" or "&table_fields(j)&" like '%"&keywords(i)&"%'"
   next
   str02=str02&")"
next
str02="("&replace(str02,")(",")and(")&")"
keyword_sousuo="(" & str01 & "or" & str02 & ")"
else
keyword_sousuo=str01
end if
end function

'==================================================
'函数名:keyword_sousuo_en
'作 用:生成sql查询条件
'参 数:table_field ------ 表的字段名(之间用逗号分开)
' keyword ------ 搜索关键词(之间用空格分开)
'返 回:sql查询条件
'==================================================
function keyword_sousuo_en(byval table_field,byval keyword)
dim str01,str02,keywords,table_fields,i,j
   
  table_fields=split(trim(table_field),",")
  keywords=split(trim(keyword),",")
  
  if table_field<>"" then
   str01="("&table_fields(0)&" like '%"&keyword&"%'"
   for j=0 to ubound(table_fields)
   str01=str01&" or "&table_fields(j)&" like '%"&keyword&"%'"
   next
   str01=str01&")"
  else
   response.Write("<script>alert('ERROR!')</script>")
   response.End()
  end if

'全角--》半角 空格
keyword=replace(keyword," "," ")
keywords=split(keyword," ")
if ubound(keywords)>0 then
for i=0 to ubound(keywords)
   str02=str02&"("&table_fields(0)&" like '%"&keywords(i)&"%'"
   for j=1 to ubound(table_fields)
   str02=str02&" or "&table_fields(j)&" like '%"&keywords(i)&"%'"
   next
   str02=str02&")"
next
str02="("&replace(str02,")(",")and(")&")"
keyword_sousuo_en="(" & str01 & "or" & str02 & ")"
else
keyword_sousuo_en=str01
end if
end function


'==================================================
'函数名:keyword_tag
'作 用:将字符串里的关键词标记为红色
'参 数:str ------ 字符串
' keyword ------ 标记关键词(之间用空格分开)
'返 回:字符串(html格式)
'==================================================
function keyword_tag(byval str,byval keyword)
dim keywords,str01,str02,i
if str<>"" then
   '全角--》半角 空格
keyword=replace(keyword," "," ")
str01=replace(str,keyword,"<font color=""#ff0000"">"&keyword&"</font>")
   keywords=split(keyword," ")
if ubound(keywords)>0 then
   str02=str
for i=0 to ubound(keywords)
str02=replace(str02,keywords(i),"<font color=""#ff0000"">"&keywords(i)&"</font>")
next
   keyword_tag=str02
else
keyword_tag=str01
end if
end if
end function
'----------------------------------------------翻页
function showpage_fun(byval pagecount,byval page,byval n)
dim query,temp,x,i,a
query = Split(Request.ServerVariables("QUERY_STRING"), "&")
    For Each x In query
        a = Split(x, "=")
        If StrComp(a(0), "page", vbTextCompare) <> 0 and StrComp(a(0), "mode", vbTextCompare) <> 0 and  StrComp(a(0), "submit", vbTextCompare) <> 0 Then
            temp = temp & a(0) & "=" & a(1) & "&"
        End If
Next
response.Write("<font color=""#ff0000"">"&page&"</font>/"&pagecount&" 页 ")
'上一页
if page>1 and page<=pagecount then
response.Write("&nbsp;<a href=""?"&temp&"page="&page-1&""">&lt;<a>&nbsp;")
else
response.Write("&nbsp;&lt;&nbsp;")
end if
'循坏页
i=0
do while i<pagecount
i=i+1
If i<2 or i=pagecount or (i>=page-n and  i<=page+n) or (page-1<=n and i<=2*n+2) or (pagecount-page<=n and i>=pagecount-2*n-1) Then
response.Write(" <a href=""?"&temp&"page="&i&""">")
if page=i then
  response.Write("<b><font color=""#333333"">"&i&"</font></b>")
Else
  response.Write(i)
End If
  response.Write("</a> &nbsp; ")
else
'省略号
  if i=2  then
  response.Write(" .. &nbsp;")
  end if
  if i=pagecount-1  then
  response.Write("  ..&nbsp;")
  end if
End If
loop
'下一页
if page>=1 and page<pagecount then
response.Write("&nbsp;<a href=""?"&temp&"page="&page+1&""">&gt;<a>&nbsp;")
else
response.Write("&nbsp;&gt;&nbsp;")
end if
response.Write("&nbsp;<a href=""?"&temp&"page="&pagecount&""">尾页&gt;&gt;</a>")
end Function



'----------------------------------------------翻页
function showpage_fun_en(byval pagecount,byval page,byval n)
dim query,temp,x,i,a
query = Split(Request.ServerVariables("QUERY_STRING"), "&")
    For Each x In query
        a = Split(x, "=")
        If StrComp(a(0), "page", vbTextCompare) <> 0 and StrComp(a(0), "mode", vbTextCompare) <> 0 and  StrComp(a(0), "submit", vbTextCompare) <> 0 Then
            temp = temp & a(0) & "=" & a(1) & "&"
        End If
Next
response.Write("Page <font color=""#ff0000"">"&page&"</font>/"&pagecount&"  ")
'上一页
if page>1 and page<=pagecount then
response.Write("&nbsp;<a href=""?"&temp&"page="&page-1&""">&lt;<a>&nbsp;")
else
response.Write("&nbsp;&lt;&nbsp;")
end if
'循坏页
i=0
do while i<pagecount
i=i+1
If i<2 or i=pagecount or (i>=page-n and  i<=page+n) or (page-1<=n and i<=2*n+2) or (pagecount-page<=n and i>=pagecount-2*n-1) Then
response.Write(" <a href=""?"&temp&"page="&i&""">")
if page=i then
  response.Write("<b><font color=""#333333"">"&i&"</font></b>")
Else
  response.Write(i)
End If
  response.Write("</a> &nbsp; ")
else
'省略号
  if i=2  then
  response.Write(" .. &nbsp;")
  end if
  if i=pagecount-1  then
  response.Write("  ..&nbsp;")
  end if
End If
loop
'下一页
if page>=1 and page<pagecount then
response.Write("&nbsp;<a href=""?"&temp&"page="&page+1&""">&gt;<a>&nbsp;")
else
response.Write("&nbsp;&gt;&nbsp;")
end if
response.Write("&nbsp;<a href=""?"&temp&"page="&pagecount&""">Bottom&gt;&gt;</a>")
end Function


'----------------------------------------------翻页 产品
function showpage_fun_html(byval pagecount,byval page,byval n, ByVal ul)
dim query,temp,x,i,a,b
query = Split(Request.ServerVariables("QUERY_STRING"), "&")
    For Each x In query
        a = Split(x, "=")
                ee = Split(ul,"=")
'                response.write ee(0)
'                response.end
        If StrComp(a(0), "page", vbTextCompare) <> 0 and StrComp(a(0), "mode", vbTextCompare) <> 0 and  StrComp(a(0), "submit", vbTextCompare) <> 0 Then
'            temp = temp & a(0) & "=" & a(1) & ""
            temp = temp & ee(0) & ""
        End If
Next
pcontent=pcontent&"<font color=""#ff0000"">"&page&"</font>/"&pagecount&" 页 "
'上一页
if page>1 and page<=pagecount then
pcontent=pcontent&"&nbsp;<a href=""../products/"&temp&"-"&page-1&".html"">&lt;<a>&nbsp;"
else
pcontent=pcontent&"&nbsp;&lt;&nbsp;"
end if
'循坏页
i=0
do while i<pagecount
i=i+1
If i<2 or i=pagecount or (i>=page-n and  i<=page+n) or (page-1<=n and i<=2*n+2) or (pagecount-page<=n and i>=pagecount-2*n-1) Then
pcontent=pcontent&" <a href=""../products/"&temp&"-"&i&".html"">"
if page=i then
  pcontent=pcontent&"<b><font color=""#333333"">"&i&"</font></b>"
Else
  pcontent=pcontent&i
End If
  pcontent=pcontent&"</a> &nbsp; "
else
'省略号
  if i=2  then
  pcontent=pcontent&" .. &nbsp;"
  end if
  if i=pagecount-1  then
  pcontent=pcontent&"  ..&nbsp;"
  end if
End If
loop
'下一页
if page>=1 and page<pagecount then
pcontent=pcontent&"&nbsp;<a href=""../products/"&temp&"-"&page+1&".html"">&gt;<a>&nbsp;"
else
pcontent=pcontent&"&nbsp;&gt;&nbsp;"
end if
pcontent=pcontent&"&nbsp;<a href=""../products/"&temp&"-"&pagecount&".html"">尾页&gt;&gt;</a>"
end Function

'----------------------------------------------翻页 产品
function showpage_fun_html_ii(byval pagecount,byval page,byval n, ByVal ul)
dim query,temp,x,i,a,b
query = Split(Request.ServerVariables("QUERY_STRING"), "&")
    For Each x In query
        a = Split(x, "=")
                ee = Split(ul,"=")
'                response.write ee(0)
'                response.end
        If StrComp(a(0), "page", vbTextCompare) <> 0 and StrComp(a(0), "mode", vbTextCompare) <> 0 and  StrComp(a(0), "submit", vbTextCompare) <> 0 Then
'            temp = temp & a(0) & "=" & a(1) & ""
            temp = temp & ee(0) & ""
        End If
Next
pcontent=pcontent&"<font color=""#ff0000"">"&page&"</font>/"&pagecount&" 页 "
'上一页
if page>1 and page<=pagecount then
pcontent=pcontent&"&nbsp;<a href=""zh-cn/products/"&temp&"-"&page-1&".html"">&lt;<a>&nbsp;"
else
pcontent=pcontent&"&nbsp;&lt;&nbsp;"
end if
'循坏页
i=0
do while i<pagecount
i=i+1
If i<2 or i=pagecount or (i>=page-n and  i<=page+n) or (page-1<=n and i<=2*n+2) or (pagecount-page<=n and i>=pagecount-2*n-1) Then
pcontent=pcontent&" <a href=""zh-cn/products/"&temp&"-"&i&".html"">"
if page=i then
  pcontent=pcontent&"<b><font color=""#333333"">"&i&"</font></b>"
Else
  pcontent=pcontent&i
End If
  pcontent=pcontent&"</a> &nbsp; "
else
'省略号
  if i=2  then
  pcontent=pcontent&" .. &nbsp;"
  end if
  if i=pagecount-1  then
  pcontent=pcontent&"  ..&nbsp;"
  end if
End If
loop
'下一页
if page>=1 and page<pagecount then
pcontent=pcontent&"&nbsp;<a href=""zh-cn/products/"&temp&"-"&page+1&".html"">&gt;<a>&nbsp;"
else
pcontent=pcontent&"&nbsp;&gt;&nbsp;"
end if
pcontent=pcontent&"&nbsp;<a href=""zh-cn/products/"&temp&"-"&pagecount&".html"">尾页&gt;&gt;</a>"
end Function


'----------------------------------------------翻页 产品
function showpage_fun_html_en(byval pagecount,byval page,byval n, ByVal ul)
dim query,temp,x,i,a,b
query = Split(Request.ServerVariables("QUERY_STRING"), "&")
    For Each x In query
        a = Split(x, "=")
                ee = Split(ul,"=")
'                response.write ee(0)
'                response.end
        If StrComp(a(0), "page", vbTextCompare) <> 0 and StrComp(a(0), "mode", vbTextCompare) <> 0 and  StrComp(a(0), "submit", vbTextCompare) <> 0 Then
'            temp = temp & a(0) & "=" & a(1) & ""
            temp = temp & ee(0) & ""
        End If
Next
pcontent=pcontent&"Page <font color=""#ff0000"">"&page&"</font>/"&pagecount&"  "
'上一页
if page>1 and page<=pagecount then
pcontent=pcontent&"&nbsp;<a href=""../products/"&temp&"-"&page-1&".html"">&lt;<a>&nbsp;"
else
pcontent=pcontent&"&nbsp;&lt;&nbsp;"
end if
'循坏页
i=0
do while i<pagecount
i=i+1
If i<2 or i=pagecount or (i>=page-n and  i<=page+n) or (page-1<=n and i<=2*n+2) or (pagecount-page<=n and i>=pagecount-2*n-1) Then
pcontent=pcontent&" <a href=""../products/"&temp&"-"&i&".html"">"
if page=i then
  pcontent=pcontent&"<b><font color=""#333333"">"&i&"</font></b>"
Else
  pcontent=pcontent&i
End If
  pcontent=pcontent&"</a> &nbsp; "
else
'省略号
  if i=2  then
  pcontent=pcontent&" .. &nbsp;"
  end if
  if i=pagecount-1  then
  pcontent=pcontent&"  ..&nbsp;"
  end if
End If
loop
'下一页
if page>=1 and page<pagecount then
pcontent=pcontent&"&nbsp;<a href=""../products/"&temp&"-"&page+1&".html"">&gt;<a>&nbsp;"
else
pcontent=pcontent&"&nbsp;&gt;&nbsp;"
end if
pcontent=pcontent&"&nbsp;<a href=""../products/"&temp&"-"&pagecount&".html"">Bottom&gt;&gt;</a>"
end Function

'----------------------------------------------翻页 产品
function showpage_fun_html_en_ii(byval pagecount,byval page,byval n, ByVal ul)
dim query,temp,x,i,a,b
query = Split(Request.ServerVariables("QUERY_STRING"), "&")
    For Each x In query
        a = Split(x, "=")
                ee = Split(ul,"=")
'                response.write ee(0)
'                response.end
        If StrComp(a(0), "page", vbTextCompare) <> 0 and StrComp(a(0), "mode", vbTextCompare) <> 0 and  StrComp(a(0), "submit", vbTextCompare) <> 0 Then
'            temp = temp & a(0) & "=" & a(1) & ""
            temp = temp & ee(0) & ""
        End If
Next
pcontent=pcontent&"Page <font color=""#ff0000"">"&page&"</font>/"&pagecount&"  "
'上一页
if page>1 and page<=pagecount then
pcontent=pcontent&"&nbsp;<a href=""en/products/"&temp&"-"&page-1&".html"">&lt;<a>&nbsp;"
else
pcontent=pcontent&"&nbsp;&lt;&nbsp;"
end if
'循坏页
i=0
do while i<pagecount
i=i+1
If i<2 or i=pagecount or (i>=page-n and  i<=page+n) or (page-1<=n and i<=2*n+2) or (pagecount-page<=n and i>=pagecount-2*n-1) Then
pcontent=pcontent&" <a href=""en/products/"&temp&"-"&i&".html"">"
if page=i then
  pcontent=pcontent&"<b><font color=""#333333"">"&i&"</font></b>"
Else
  pcontent=pcontent&i
End If
  pcontent=pcontent&"</a> &nbsp; "
else
'省略号
  if i=2  then
  pcontent=pcontent&" .. &nbsp;"
  end if
  if i=pagecount-1  then
  pcontent=pcontent&"  ..&nbsp;"
  end if
End If
loop
'下一页
if page>=1 and page<pagecount then
pcontent=pcontent&"&nbsp;<a href=""en/products/"&temp&"-"&page+1&".html"">&gt;<a>&nbsp;"
else
pcontent=pcontent&"&nbsp;&gt;&nbsp;"
end if
pcontent=pcontent&"&nbsp;<a href=""en/products/"&temp&"-"&pagecount&".html"">Bottom&gt;&gt;</a>"
end Function


'----------------------------------------------翻页 产品
function showpage_fun_html_i(byval pagecount,byval page,byval n, ByVal ul)
dim query,temp,x,i,a,b
query = Split(Request.ServerVariables("QUERY_STRING"), "&")
    For Each x In query
        a = Split(x, "=")
                ee = Split(ul,"=")
'                response.write ee(0)
'                response.end
        If StrComp(a(0), "page", vbTextCompare) <> 0 and StrComp(a(0), "mode", vbTextCompare) <> 0 and  StrComp(a(0), "submit", vbTextCompare) <> 0 Then
'            temp = temp & a(0) & "=" & a(1) & ""
            temp = temp & ee(0) & ""
        End If
Next
pcontent=pcontent&"<font color=""#ff0000"">"&page&"</font>/"&pagecount&" 页 "
'上一页
if page>1 and page<=pagecount then
pcontent=pcontent&"&nbsp;<a href=""../products/index-"&page-1&".html"">&lt;<a>&nbsp;"
else
pcontent=pcontent&"&nbsp;&lt;&nbsp;"
end if
'循坏页
i=0
do while i<pagecount
i=i+1
If i<2 or i=pagecount or (i>=page-n and  i<=page+n) or (page-1<=n and i<=2*n+2) or (pagecount-page<=n and i>=pagecount-2*n-1) Then
pcontent=pcontent&" <a href=""../products/index-"&i&".html"">"
if page=i then
  pcontent=pcontent&"<b><font color=""#333333"">"&i&"</font></b>"
Else
  pcontent=pcontent&i
End If
  pcontent=pcontent&"</a> &nbsp; "
else
'省略号
  if i=2  then
  pcontent=pcontent&" .. &nbsp;"
  end if
  if i=pagecount-1  then
  pcontent=pcontent&"  ..&nbsp;"
  end if
End If
loop
'下一页
if page>=1 and page<pagecount then
pcontent=pcontent&"&nbsp;<a href=""../products/index-"&page+1&".html"">&gt;<a>&nbsp;"
else
pcontent=pcontent&"&nbsp;&gt;&nbsp;"
end if
pcontent=pcontent&"&nbsp;<a href=""../products/index-"&pagecount&".html"">尾页&gt;&gt;</a>"
end Function

'----------------------------------------------翻页 产品
function showpage_fun_html_i_en(byval pagecount,byval page,byval n, ByVal ul)
dim query,temp,x,i,a,b
query = Split(Request.ServerVariables("QUERY_STRING"), "&")
    For Each x In query
        a = Split(x, "=")
                ee = Split(ul,"=")
'                response.write ee(0)
'                response.end
        If StrComp(a(0), "page", vbTextCompare) <> 0 and StrComp(a(0), "mode", vbTextCompare) <> 0 and  StrComp(a(0), "submit", vbTextCompare) <> 0 Then
'            temp = temp & a(0) & "=" & a(1) & ""
            temp = temp & ee(0) & ""
        End If
Next
pcontent=pcontent&"Page <font color=""#ff0000"">"&page&"</font>/"&pagecount&"  "
'上一页
if page>1 and page<=pagecount then
pcontent=pcontent&"&nbsp;<a href=""../products/index-"&page-1&".html"">&lt;<a>&nbsp;"
else
pcontent=pcontent&"&nbsp;&lt;&nbsp;"
end if
'循坏页
i=0
do while i<pagecount
i=i+1
If i<2 or i=pagecount or (i>=page-n and  i<=page+n) or (page-1<=n and i<=2*n+2) or (pagecount-page<=n and i>=pagecount-2*n-1) Then
pcontent=pcontent&" <a href=""../products/index-"&i&".html"">"
if page=i then
  pcontent=pcontent&"<b><font color=""#333333"">"&i&"</font></b>"
Else
  pcontent=pcontent&i
End If
  pcontent=pcontent&"</a> &nbsp; "
else
'省略号
  if i=2  then
  pcontent=pcontent&" .. &nbsp;"
  end if
  if i=pagecount-1  then
  pcontent=pcontent&"  ..&nbsp;"
  end if
End If
loop
'下一页
if page>=1 and page<pagecount then
pcontent=pcontent&"&nbsp;<a href=""../products/index-"&page+1&".html"">&gt;<a>&nbsp;"
else
pcontent=pcontent&"&nbsp;&gt;&nbsp;"
end if
pcontent=pcontent&"&nbsp;<a href=""../products/index-"&pagecount&".html"">Bottom&gt;&gt;</a>"
end Function

'----------------------------------------------翻页 新闻
function showpage_fun_html_news(byval pagecount,byval page,byval n, ByVal ul)
dim query,temp,x,i,a,b
query = Split(Request.ServerVariables("QUERY_STRING"), "&")
    For Each x In query
        a = Split(x, "=")
                ee = Split(ul,"=")
'                response.write ee(0)
'                response.end
        If StrComp(a(0), "page", vbTextCompare) <> 0 and StrComp(a(0), "mode", vbTextCompare) <> 0 and  StrComp(a(0), "submit", vbTextCompare) <> 0 Then
'            temp = temp & a(0) & "=" & a(1) & ""
            temp = temp & ee(0) & ""
        End If
Next
pcontent=pcontent&"<font color=""#ff0000"">"&page&"</font>/"&pagecount&" 页 "
'上一页
if page>1 and page<=pagecount then
pcontent=pcontent&"&nbsp;<a href=""../news/"&temp&"-"&page-1&".html"">&lt;<a>&nbsp;"
else
pcontent=pcontent&"&nbsp;&lt;&nbsp;"
end if
'循坏页
i=0
do while i<pagecount
i=i+1
If i<2 or i=pagecount or (i>=page-n and  i<=page+n) or (page-1<=n and i<=2*n+2) or (pagecount-page<=n and i>=pagecount-2*n-1) Then
pcontent=pcontent&" <a href=""../news/"&temp&"-"&i&".html"">"
if page=i then
  pcontent=pcontent&"<b><font color=""#333333"">"&i&"</font></b>"
Else
  pcontent=pcontent&i
End If
  pcontent=pcontent&"</a> &nbsp; "
else
'省略号
  if i=2  then
  pcontent=pcontent&" .. &nbsp;"
  end if
  if i=pagecount-1  then
  pcontent=pcontent&"  ..&nbsp;"
  end if
End If
loop
'下一页
if page>=1 and page<pagecount then
pcontent=pcontent&"&nbsp;<a href=""../news/"&temp&"-"&page+1&".html"">&gt;<a>&nbsp;"
else
pcontent=pcontent&"&nbsp;&gt;&nbsp;"
end if
pcontent=pcontent&"&nbsp;<a href=""../news/"&temp&"-"&pagecount&".html"">尾页&gt;&gt;</a>"
end Function

'----------------------------------------------翻页 新闻
function showpage_fun_html_news_en(byval pagecount,byval page,byval n, ByVal ul)
dim query,temp,x,i,a,b
query = Split(Request.ServerVariables("QUERY_STRING"), "&")
    For Each x In query
        a = Split(x, "=")
                ee = Split(ul,"=")
'                response.write ee(0)
'                response.end
        If StrComp(a(0), "page", vbTextCompare) <> 0 and StrComp(a(0), "mode", vbTextCompare) <> 0 and  StrComp(a(0), "submit", vbTextCompare) <> 0 Then
'            temp = temp & a(0) & "=" & a(1) & ""
            temp = temp & ee(0) & ""
        End If
Next
pcontent=pcontent&"Page <font color=""#ff0000"">"&page&"</font>/"&pagecount&"  "
'上一页
if page>1 and page<=pagecount then
pcontent=pcontent&"&nbsp;<a href=""../news/"&temp&"-"&page-1&".html"">&lt;<a>&nbsp;"
else
pcontent=pcontent&"&nbsp;&lt;&nbsp;"
end if
'循坏页
i=0
do while i<pagecount
i=i+1
If i<2 or i=pagecount or (i>=page-n and  i<=page+n) or (page-1<=n and i<=2*n+2) or (pagecount-page<=n and i>=pagecount-2*n-1) Then
pcontent=pcontent&" <a href=""../news/"&temp&"-"&i&".html"">"
if page=i then
  pcontent=pcontent&"<b><font color=""#333333"">"&i&"</font></b>"
Else
  pcontent=pcontent&i
End If
  pcontent=pcontent&"</a> &nbsp; "
else
'省略号
  if i=2  then
  pcontent=pcontent&" .. &nbsp;"
  end if
  if i=pagecount-1  then
  pcontent=pcontent&"  ..&nbsp;"
  end if
End If
loop
'下一页
if page>=1 and page<pagecount then
pcontent=pcontent&"&nbsp;<a href=""../news/"&temp&"-"&page+1&".html"">&gt;<a>&nbsp;"
else
pcontent=pcontent&"&nbsp;&gt;&nbsp;"
end if
pcontent=pcontent&"&nbsp;<a href=""../news/"&temp&"-"&pagecount&".html"">Bottom&gt;&gt;</a>"
end Function

'----------------------------------------------翻页 新闻
function showpage_fun_html_news_i(byval pagecount,byval page,byval n, ByVal ul)
dim query,temp,x,i,a,b
query = Split(Request.ServerVariables("QUERY_STRING"), "&")
    For Each x In query
        a = Split(x, "=")
                ee = Split(ul,"=")
'                response.write ee(0)
'                response.end
        If StrComp(a(0), "page", vbTextCompare) <> 0 and StrComp(a(0), "mode", vbTextCompare) <> 0 and  StrComp(a(0), "submit", vbTextCompare) <> 0 Then
'            temp = temp & a(0) & "=" & a(1) & ""
            temp = temp & "index" & ""
        End If
Next
pcontent=pcontent&"<font color=""#ff0000"">"&page&"</font>/"&pagecount&" 页 "
'上一页
if page>1 and page<=pagecount then
pcontent=pcontent&"&nbsp;<a href=""../news/index-"&page-1&".html"">&lt;<a>&nbsp;"
else
pcontent=pcontent&"&nbsp;&lt;&nbsp;"
end if
'循坏页
i=0
do while i<pagecount
i=i+1
If i<2 or i=pagecount or (i>=page-n and  i<=page+n) or (page-1<=n and i<=2*n+2) or (pagecount-page<=n and i>=pagecount-2*n-1) Then
pcontent=pcontent&" <a href=""../news/index-"&i&".html"">"
if page=i then
  pcontent=pcontent&"<b><font color=""#333333"">"&i&"</font></b>"
Else
  pcontent=pcontent&i
End If
  pcontent=pcontent&"</a> &nbsp; "
else
'省略号
  if i=2  then
  pcontent=pcontent&" .. &nbsp;"
  end if
  if i=pagecount-1  then
  pcontent=pcontent&"  ..&nbsp;"
  end if
End If
loop
'下一页
if page>=1 and page<pagecount then
pcontent=pcontent&"&nbsp;<a href=""../news/index-"&page+1&".html"">&gt;<a>&nbsp;"
else
pcontent=pcontent&"&nbsp;&gt;&nbsp;"
end if
pcontent=pcontent&"&nbsp;<a href=""../news/index-"&pagecount&".html"">尾页&gt;&gt;</a>"
end function
'----------------------------------------------翻页 新闻
function showpage_fun_html_news_i_en(byval pagecount,byval page,byval n, ByVal ul)
dim query,temp,x,i,a,b
query = Split(Request.ServerVariables("QUERY_STRING"), "&")
    For Each x In query
        a = Split(x, "=")
                ee = Split(ul,"=")
'                response.write ee(0)
'                response.end
        If StrComp(a(0), "page", vbTextCompare) <> 0 and StrComp(a(0), "mode", vbTextCompare) <> 0 and  StrComp(a(0), "submit", vbTextCompare) <> 0 Then
'            temp = temp & a(0) & "=" & a(1) & ""
            temp = temp & "index" & ""
        End If
Next
pcontent=pcontent&"Page <font color=""#ff0000"">"&page&"</font>/"&pagecount&"  "
'上一页
if page>1 and page<=pagecount then
pcontent=pcontent&"&nbsp;<a href=""../news/index-"&page-1&".html"">&lt;<a>&nbsp;"
else
pcontent=pcontent&"&nbsp;&lt;&nbsp;"
end if
'循坏页
i=0
do while i<pagecount
i=i+1
If i<2 or i=pagecount or (i>=page-n and  i<=page+n) or (page-1<=n and i<=2*n+2) or (pagecount-page<=n and i>=pagecount-2*n-1) Then
pcontent=pcontent&" <a href=""../news/index-"&i&".html"">"
if page=i then
  pcontent=pcontent&"<b><font color=""#333333"">"&i&"</font></b>"
Else
  pcontent=pcontent&i
End If
  pcontent=pcontent&"</a> &nbsp; "
else
'省略号
  if i=2  then
  pcontent=pcontent&" .. &nbsp;"
  end if
  if i=pagecount-1  then
  pcontent=pcontent&"  ..&nbsp;"
  end if
End If
loop
'下一页
if page>=1 and page<pagecount then
pcontent=pcontent&"&nbsp;<a href=""../news/index-"&page+1&".html"">&gt;<a>&nbsp;"
else
pcontent=pcontent&"&nbsp;&gt;&nbsp;"
end if
pcontent=pcontent&"&nbsp;<a href=""../news/index-"&pagecount&".html"">Bottom&gt;&gt;</a>"
end function

'----------------------------------------------随机数
Function getkey(digits)
dim char_array(50),output,num
output=""
char_array(0) = "0"
char_array(1) = "1"
char_array(2) = "2"
char_array(3) = "3"
char_array(4) = "4"
char_array(5) = "5"
char_array(6) = "6"
char_array(7) = "7"
char_array(8) = "8"
char_array(9) = "9"
char_array(10) = "A"
char_array(11) = "B"
char_array(12) = "C"
char_array(13) = "D"
char_array(14) = "E"
char_array(15) = "F"
char_array(16) = "G"
char_array(17) = "H"
char_array(18) = "I"
char_array(19) = "J"
char_array(20) = "K"
char_array(21) = "L"
char_array(22) = "M"
char_array(23) = "N"
char_array(24) = "O"
char_array(25) = "P"
char_array(26) = "Q"
char_array(27) = "R"
char_array(28) = "S"
char_array(29) = "T"
char_array(30) = "U"
char_array(31) = "V"
char_array(32) = "W"
char_array(33) = "X"
char_array(34) = "Y"
char_array(35) = "Z"
randomize
do while len(output) < digits
num = char_array(Int((35 - 0 + 1) * Rnd + 0))
output = output + num
loop
getkey = output
End Function

'提取纯文字 去html标签
Function cutStr(str,strlen)
if str<>"" then
Dim re
Set re=new RegExp
re.IgnoreCase =True
re.Global=True
re.Pattern="<(.[^>]*)>"
str=re.Replace(str,"")
set re=Nothing
Dim l,t,c,i
l=Len(str)
t=0
For i=1 to l
c=Abs(Asc(Mid(str,i,1)))
If c>255 Then
t=t+2
Else
t=t+1
End If
If t>=strlen Then
cutStr=left(str,i)&"..."
Exit For
Else
cutStr=str
End If
Next
cutStr=Replace(cutStr,chr(10),"")
cutStr=Replace(cutStr,chr(13),"")
'cutStr=Replace(cutStr,chr(32),"")
end if
End Function

Function ReadFromUTF(TempString,CharSet)
Dim str
Set stm=server.CreateObject("adodb.stream")
stm.Type=2
stm.Mode=3
stm.Charset=CharSet
stm.Open
stm.loadfromfile Server.MapPath(TempString)
str=stm.readtext
stm.Close
Set stm=Nothing
ReadFromUTF=str
End Function
Function WriteToUTF(content,Filen)
Set objStream=Server.CreateObject("ADODB.Stream")
    With objStream
    .Open
    .Charset="utf-8"
    .Position=objStream.Size
    .WriteText=content
    .saveToFile server.mappath(Filen),2
    .Close
    End With
Set objStream=Nothing
End Function

Const sFileExt="jpg|gif|bmp|png|jpeg"

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
         Call SaveRemoteFile(SaveFileName, RemoteFileurl)
                          s_Content = Replace(s_Content,RemoteFileurl,SaveFileName)
     Next
     ReplaceRemoteUrl = s_Content
End Function

Sub SaveRemoteFile(s_LocalFileName,s_RemoteFileUrl)
     Dim Ads, Retrieval, GetRemoteData
     On Error Resume Next
     Set Retrieval = Server.CreateObject("Microsoft.XMLHTTP")
     With Retrieval
         .Open "Get", s_RemoteFileUrl, False, "", ""
         .Send
         GetRemoteData = .ResponseBody
     End With
     Set Retrieval = Nothing
     Set Ads = Server.CreateObject("Adodb.Stream")
     With Ads
         .Type = 1
         .Open
         .Write GetRemoteData
         .SaveToFile Server.MapPath(s_LocalFileName), 2
         .Cancel()
         .Close()
     End With
     Set Ads=nothing
End Sub

Function CopyMyFolder(FolderName,FolderPath)
sFolder=server.mappath(FolderName)
oFolder=server.mappath(FolderPath)
set fso=server.createobject("scripting.filesystemobject")
if fso.folderexists(server.mappath(FolderName)) Then
if fso.folderexists(server.mappath(FolderPath)) Then
fso.copyfolder sFolder,oFolder
Else
CreateNewFolder = Server.Mappath(FolderPath)
fso.CreateFolder(CreateNewFolder)
fso.copyfolder sFolder,oFolder
End if
CopyMyFolder="复制文件夹["&server.mappath(FolderName)&"]到["&server.mappath(FolderPath)&"]成功!"
Else
CopyMyFolder="错误,原文件夹["&sFolde&"]不存在!"
End If
set fso=nothing
End Function

function FNameGL(byval fString)
if not isnull(fString) then
    fString = replace(fString, " ", "-")
    fString = replace(fString, "&nbsp;", "-")
    fString = Replace(fString, "'", "")
    fString = Replace(fString, "%", "")
    fString = Replace(fString, """", "")
    fString = Replace(fString, "#", "")
    fString = Replace(fString, "?", "")
    fString = Replace(fString, "‘", "")
    fString = Replace(fString, "’", "")
    fString = Replace(fString, ",", "-")
        fString = Replace(fString, "(", "")
        fString = Replace(fString, ")", "")
        fString = Replace(fString, "(", "")
        fString = Replace(fString, ")", "")
        fString = Replace(fString, "/", "-")
        fString = Replace(fString, "\", "-")
        fString = Replace(fString, ":", "-")
        fString = Replace(fString, "*", "-")
        fString = Replace(fString, "^", "-")
        fString = Replace(fString, "&", "-")
        fString = Replace(fString, "!", "-")
        fString = Replace(fString, "`", "-")
        fString = Replace(fString, "~", "-")
        fString = Replace(fString, ";", "-")
        fString = Replace(fString, ",", "-")
        fString = Replace(fString, "|", "-")
    FNameGL = fString
end if
end function
%>

回答|共 5 个

暮木娃娃

发表于 2012-2-17 09:31:15 | 显示全部楼层

检查目录是否存在。检查文件夹权限
RAKSmart
回复 支持 反对

使用道具 举报

lwbo1987

发表于 2012-2-17 09:37:01 | 显示全部楼层

代码不太懂,自己注意文件或文件夹权限,还有你使用的什么程序,Godaddy仅支持信任等级medium trust level的程序,full trust level不支持的
回复 支持 反对

使用道具 举报

yeziflower

发表于 2012-2-17 16:45:32 | 显示全部楼层

我也不懂这是什么程序,我是网上买的,现在不给我服务了,只能来这求大家。

这个要怎么解决,谁能帮我,是代码有错吗?


我网上查了好多,有的说是时间代码有问题,有的说是权限问题,权限我是有弄了,应该不会有问题。

那位高人能解答,在这谢谢了。帮我修改下代码,让我试下

回复 支持 反对

使用道具 举报

bingruigege

发表于 2012-2-17 17:25:45 | 显示全部楼层

虽然不懂但是顶一下
回复 支持 反对

使用道具 举报

yeziflower

发表于 2015-1-11 10:38:15 | 显示全部楼层

2012年出现过,现在又出现这样的问题,是权限问题,可是现在权限写不了
回复 支持 反对

使用道具 举报

天天有喜

发表于 2015-1-13 16:52:58 | 显示全部楼层

yeziflower 发表于 2015-1-11 10:38 AM
2012年出现过,现在又出现这样的问题,是权限问题,可是现在权限写不了

联系下他们的客服吧,现在在线联系很方便的。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则