我搞了一个生成HTML类别的导航,请asp高手帮忙
story_cla_css=Request.Form("story_cla_css")story_cla_title=Trim(Request.Form("story_c...
story_cla_css=Request.Form("story_cla_css")
story_cla_title=Trim(Request.Form("story_cla_title"))
story_cla_htmlfile=Trim(Request.Form("story_cla_htmlfile"))
story_cla_pic=Request.Form("story_cla_pic")
Set Rs=Server.CreateObject("Adodb.recordset")
Sql="Select * From story_bigclass Where story_cla_htmlfile = '"&story_cla_htmlfile&"' Or story_cla_title = '"&story_cla_title&"'"
Rs.Open Sql,Connstory,1,3
IF Not Rs.Eof Then
response.write "<SCRIPT language=JavaScript>alert('你填写的类别链接或标题已存在,请重新填写~!');"
response.write "history.go(-1);"
response.write "</script>"
response.end
End IF
Rs.Addnew
Rs("story_cla_css")=story_cla_css
Rs("story_cla_title")=story_cla_title
Rs("story_cla_htmlfile")=story_cla_htmlfile
Rs("story_cla_pic")=story_cla_pic
Rs("story_cla_rqi")=Now()
Rs.Update'信息填加成功
Set Rs1=Server.CreateObject("Adodb.recordset")
Sql="Select * From story_bigclass"
Rs1.Open Sql,Connstory,1,3
Call STORY_MB()
Dim story_mb1_tmp
story_mb1_tmp1=Application("STORY_HTML_MB")(1,0)
While Not Rs1.Eof
story_mb1=story_mb1_tmp1
story_mb1_tmp=replace(story_mb1,"$story_cla_title$",Rs1("story_cla_title"))
story_mb1_tmp=replace(story_mb1_tmp,"$story_cla_css$",Rs1("story_cla_css"))
story_mb1_tmp=replace(story_mb1_tmp,"$story_cla_htmlfile$",Rs1("story_cla_htmlfile"))
story_mb1_tmp=replace(story_mb1_tmp,"$story_cla_pic$",Rs1("story_cla_pic"))
Tourl="../../../PageHtml/BigClassHtml/"&Rs1("story_cla_htmlfile")
HtmNL=story_mb1_tmp
Response.Write Server.HTMLEncode(story_mb1)
Rs1.Movenext
Wend
Rs.Close
Set Rs=Nothing
Rs1.Close
Set Rs1=Nothing
'写入HTML文件
MyFile = Server.MapPath(Tourl)
Set fileStreamObj = CreateObject("Scripting.FileSystemObject")
fileStreamObj.CreateTextFile(myFile)
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set fout = fso.CreateTextFile(server.mappath(tourl),true)
fout.WriteLine HtmNL
fout.close
比如,我现在添加一个标题,我想让每一页都有同样的标题,不知道该如何做呢,生成HTML文件的时候我不会了
这是所有的代码,帮忙看下 展开
story_cla_title=Trim(Request.Form("story_cla_title"))
story_cla_htmlfile=Trim(Request.Form("story_cla_htmlfile"))
story_cla_pic=Request.Form("story_cla_pic")
Set Rs=Server.CreateObject("Adodb.recordset")
Sql="Select * From story_bigclass Where story_cla_htmlfile = '"&story_cla_htmlfile&"' Or story_cla_title = '"&story_cla_title&"'"
Rs.Open Sql,Connstory,1,3
IF Not Rs.Eof Then
response.write "<SCRIPT language=JavaScript>alert('你填写的类别链接或标题已存在,请重新填写~!');"
response.write "history.go(-1);"
response.write "</script>"
response.end
End IF
Rs.Addnew
Rs("story_cla_css")=story_cla_css
Rs("story_cla_title")=story_cla_title
Rs("story_cla_htmlfile")=story_cla_htmlfile
Rs("story_cla_pic")=story_cla_pic
Rs("story_cla_rqi")=Now()
Rs.Update'信息填加成功
Set Rs1=Server.CreateObject("Adodb.recordset")
Sql="Select * From story_bigclass"
Rs1.Open Sql,Connstory,1,3
Call STORY_MB()
Dim story_mb1_tmp
story_mb1_tmp1=Application("STORY_HTML_MB")(1,0)
While Not Rs1.Eof
story_mb1=story_mb1_tmp1
story_mb1_tmp=replace(story_mb1,"$story_cla_title$",Rs1("story_cla_title"))
story_mb1_tmp=replace(story_mb1_tmp,"$story_cla_css$",Rs1("story_cla_css"))
story_mb1_tmp=replace(story_mb1_tmp,"$story_cla_htmlfile$",Rs1("story_cla_htmlfile"))
story_mb1_tmp=replace(story_mb1_tmp,"$story_cla_pic$",Rs1("story_cla_pic"))
Tourl="../../../PageHtml/BigClassHtml/"&Rs1("story_cla_htmlfile")
HtmNL=story_mb1_tmp
Response.Write Server.HTMLEncode(story_mb1)
Rs1.Movenext
Wend
Rs.Close
Set Rs=Nothing
Rs1.Close
Set Rs1=Nothing
'写入HTML文件
MyFile = Server.MapPath(Tourl)
Set fileStreamObj = CreateObject("Scripting.FileSystemObject")
fileStreamObj.CreateTextFile(myFile)
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set fout = fso.CreateTextFile(server.mappath(tourl),true)
fout.WriteLine HtmNL
fout.close
比如,我现在添加一个标题,我想让每一页都有同样的标题,不知道该如何做呢,生成HTML文件的时候我不会了
这是所有的代码,帮忙看下 展开
1个回答
博思aippt
2024-07-20 广告
2024-07-20 广告
博思AIPPT是基于ai制作PPT的智能在线工具,它提供了4种AI制作PPT的方式,包括AI生成大纲、AI直接生成PPT、文本生成PPT、AI提炼文档生成PPT,一站式集成多种AI生成PPT的方式,可满足办公用户的不同需求和使用场景。ai生...
点击进入详情页
本回答由博思aippt提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询