Library name vote
Table Tbcomment
Userip text
Comment Text
Table Tbvote
Voteid Automatic Numbering
Votechapter text
Votecount Digital
Afterpost.asp
<%@ Language=vbscript%>
<%
' The function of this ASP file is to save the new articles that users have written in the form of a text file.
' New article unified in the relative path to the new1/folder, the new article name has certain rules
' The first one is newchapter1.html, and the second is newchapter2.html according to the article published successively
' Order, considering that can not be unlimited to allow online users to continue to write articles, can generate up to 100 pieces
' The new article contains some HTML tags so that you can connect directly to the file when making the connection
Instead of using the program to read the file and then control the output format, the connection is made using the ContentLink component,
' The application of this component is shown in the following way,
' To take advantage of a text file that has a certain format to describe the connection, this text file is named New.txt
' is also stored under the relative directory new1/
If Request.ServerVariables ("http_method") = "POST" Then
Set Fsys=server. CreateObject ("Scripting.FileSystemObject")
' Get the physical path to the folder
Phypath=server. MapPath ("/project4_local")
If not fsys. FolderExists (Phypath & "/new1") Then
' If the folder that holds the new story section does not exist, create the folder
Fsys. CreateFolder (Phypath & "/new1")
End If
For I=1 to 100
' The new Story section received every day is not greater than 100
If not fsys. FileExists (Phypath & "/new1/newchapter" & I & ". html") Then
Fsys. CreateTextFile ("Newchapter" & I & ". html")
Set Txtfile=fsys. OpenTextFile (Phypath & "/new1/newchapter" & I & ". html", 2,true)
Exit For
End If
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.