Description de la fonction:
Ce code implémente l'extraction des données de l'accès pour créer des fichiers HTML sans créer de dossiers.
Si le nom de fichier est le même que le nom de fichier à créer, écrasez-le, le même principe que SQL Update.
Fonctions à ajouter: Supprimer et rechercher.
La copie de code est la suivante:
<%
'' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '.
'
'Sujet: ASP créent un fichier statique / htmlbystabx
'
'écrivain: stabx <[email protected]>
'
«Blog: http: //btbtd.exblog.jp/;
'
'Blog / Site: Phoenix.gi-p.gi//GreenInstitute
'
'Date: 2006-5-22
'
'' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '.
Setrs = server.createObject ("adodb.recordSet")
sql = "selecttop10 * from (selecttop3500 * fromctarticleOrderByarticleidasc) orderByarticleIdDesc" '', actuellement considéré comme plus de dinosaure que le dinosaure
Rs.OpenSQL, MM_CONND_STRING, 1
tandis
cid_ = rs ("classid")
ncid_ = rs ("nclassid")
AID_ = RS ("ArticleId")
adt_ = rs ("dataandtime")
tt_ = rs ("title")
ct_ = rs ("contenu")
'em_ = htmltotext (rs ("e-mail"))
'ht_ = rs ("Hits")
'url_ = rs ("url")
'src_ = rs ("www")
'Au_ = htmltotext (rs ("écrivain"))
Response.write "<ahref =" "& cid _ &" _ "& ncid _ &" _ "& Aid _ &". Htm "" Target = "" _ Blank ""> "& cid _ &" _ "& ncid _ &" _ "& ncid _ &" _ "& Aid _ &". Crée le fichier
cFileName = cid _ & "_" & ncid _ & "_" & Aid _ & ". Htm" 'Nom du nom de fichier à créer
setdfso = createObject ("scripting.filesystemObject")
Setchtml = dfso.CreateTextFile (server.mappath (cFileName), true) 'l'existence signifie l'écrasement
chtml.writeLine ("<html> <éadfr>")
chtml.writeline ("<linkrel = 'stylesheet'type =' text / css'href = '.. / css / css_first / ctarticle.css'>")
chtml.writeLine ("<Title>" & sitename _ & "" & tt _ & "</ititle>")
chtml.writeLine ("</ad> <body>")
chtml.writeline ("Title:" & tt _ & "<p />")
chtml.writeline ("Content:" & ct _ & "<p />")
chtml.writeline ("CreatedBycid:" & cid _ & "ncid:" & ncid _ & "Aid:" & Aid_ & "
")
AID_ = CLNG (AID_)
chtml.writeline ("PageCreateDon:" & maintenant ())
chtml.writeLine ("</body> </html>")
chtml.close
Rs.MovEnext
se promener
Rs.Close
setrs = rien%>