기능 설명 :
이 코드는 폴더를 생성하지 않고 HTML 파일을 생성하기 위해 액세스에서 데이터의 추출을 구현합니다.
파일 이름이 생성 할 파일 이름과 동일하면 SQL 업데이트와 동일한 원리를 덮어 씁니다.
추가 할 기능 : 삭제 및 검색.
코드 사본은 다음과 같습니다.
<%
'' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' ''을 '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '은
'
'제목 : ASP는 정적 파일/htmlbystabx를 만듭니다
'
'작가 : stabx <[email protected]>
'
'블로그 : http : //btbtd.exblog.jp/;
'
'블로그/사이트 : phoenix.gi-p.gi//greeninstitute
'
'날짜 : 2006-5-22
'
'' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' ''을 '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '은
setrs = server.createobject ( "adodb.recordset")
sql = "selecttop10*from (selecttop3500*fromctarticleOderByArticleIdasc) OrderByArticleIdesc" '하위 쿼리, 현재 공룡보다 더 공룡으로 간주됩니다.
rs.opensql, mm_conn_string, 1
whilenotrs.eof '루프는 쿼리의 모든 레코드를 HTML 파일로 만듭니다.
cid_ = rs ( "classid")
ncid_ = rs ( "nclassid")
AID_ = RS ( "articleID")
adt_ = rs ( "dateandtime")
TT_ = RS ( "제목")
CT_ = RS ( "내용")
'em_ = htmltotext (rs ( "이메일"))
'ht_ = rs ( "hits")
'url_ = rs ( "url")
'src_ = rs ( "www")
'au_ = htmltotext (rs ( "Writer"))
응답. "<ahref =" "& cid _ &"_ "& ncid _ &"_ "& aid _ &". htm ""target = ""_ blank ""> "& cid _ &"_ "& ncid _ &"_ "& ncid _ &"_ "& AID _ & AID </a,"</a (nog) "&" 파일을 만듭니다
cfilename = cid _ & "_"& ncid _ & "_"& aid _ & ". htm" '이름을 생성 할 파일 이름입니다
setdfso = createobject ( "scripting.filesystemobject")
setchtml = dfso.createtextFile (server.mappath (cfilename), true) '존재는 덮어 쓰기를 의미합니다
chtml.writeline ( "<html> <head>")
chtml.writeline ( "<linkrel = 'Stylesheet'Type ='text/css'href = '../css/css_first/ctarticle.css'>")
chtml.writeline ( "<title>"& siteName _ & ""& tt _ & "</title>")
chtml.writeline ( "</head> <body>")
chtml.writeline ( "제목 :"& tt _ & "<p/>")
chtml.writeline ( "내용 :"& ct _ & "<p/>")
chtml.writeline ( "createbycid :"& cid _ & "ncid :"& ncid _ & "aid :"& aid_ & "
")
AID_ = CLNG (AID_)
chtml.writeline ( "pagecreatedon :"& now ())
chtml.writeline ( "</body> </html>")
chtml.close
rs.movenext
향하게 하다
Rs.Close
setrs = nothing%>