|
|
如题 asp acc 不能生成静态页面,脚本提示生成成功 实际 并没有生成文件!
本地测试没问题 可以生成!
数据库转换成 97 的 了
代码如下!- <%dim Skin_Id,strOut,Skin_Html,fldr,Skin_Name
- Skin_Id=Request("Skin_Id")
- Menu=Request("Menu")
- if Skin_Id<>"" then
- rs.open"select Skin_Skin,Skin_Html,Skin_Name from Skin where Skin_Id="&Skin_Id,conn,1,3
- if not rs.eof then
- strOut=rs("Skin_Skin")
- Skin_Html=rs("Skin_Html")
- Skin_Name=rs("Skin_Name")
- else
- Response.Write("<script language=javascript>alert('没有找到模板');DivOpenClose('',2,0,0);</script>")
- Response.End()
- end if
- rs.close
- rs.open"select IndexAd_Label,IndexAd_Html from IndexAd",conn,1,3
- while not rs.eof
- if rs("IndexAd_EndTime")<>"" then
- if rsDetail("IndexAd_EndTime")>=date() then
- strOut=Replace(strOut,rs("IndexAd_Label"),rs("IndexAd_Html"))
- end if
- else
- strOut=Replace(strOut,rs("IndexAd_Label"),rs("IndexAd_Html"))
- end if
- rs.movenext
- wend
- rs.close
- strOut=Replace(strOut,"$Skin_Name$",Skin_Name)
- strOut=Replace(strOut,"$Site_TopAd$",Site_TopAd)
- strOut=Replace(strOut,"$Site_BottomAd$",Site_BottomAd)
- strOut=Replace(strOut,"$Skin_Name$",Skin_Name)
- Dim fso,f
- Call SiteLable()
- Set fso=Server.CreateObject("Scripting.FileSystemObject")
- fldr = ""
- GetNewsFold = Split(Skin_Html, "/")
- For f = 0 To UBound(GetNewsFold)-1
- if fldr="" then
- fldr=GetNewsFold(f)
- else
- fldr=fldr&""&GetNewsFold(f)
- end if
- If IsFolder(fldr)=false then
- CreateFolder "../"&fldr
- End If
- Next
-
- Set f=fso.CreateTextFile(Server.MapPath(Site_Div&Skin_Html&".html"),true)
- f.WriteLine strOut
- f.close
- fso.close
- Set f=Nothing
- Set fso=Nothing
- Response.Write("<script language=javascript>alert('生成成功');parent.window.location.reload();DivOpenClose('',2,0,0);</script>")
- end if
- %>
复制代码 先谢谢大家! |
|