Developer on Alibaba Coud: Build your first app with APIs, SDKs, and tutorials on the Alibaba Cloud. Read more ＞
When I was playing a game website in year 99, I was troubled by the publishing of articles. However, ASP was not excellent at that time. It will only be used. When a long file contains 10000 characters, the web page is a long one.
Last year, when I made a general article and the news management system, I wrote a piece of code to separate it. Paste it now.
My article input interface is a WEB-based HEMLEDITOR, which is similar to the ABC code here. Therefore, the actual submitted text is in HTML format.
The corresponding processing of HTML will not be made into HTML code.
Another brother once said that the principle is the same, but I have not read it carefully. I don't know what the difference is.
The code is as follows:
'Request Form Item
I _Forder = Request. Form ("I _Folder ")
I _Topic = Request. Form ("I _Topic ")
I _Title = htmlencode (Request. Form ("I _Title "))
I _Body = Request. Form ("body ")
I _Source = Request. Form ("I _Source ")
I _Keyword = htmlencode (Request. Form ("I _Keyword "))
I _ISHOT = request. form ("ishot ")
If I _ishot = "" then I _ishot = "N"
I _ispic = request. form ("ispic ")
If I _ispic = "" then I _ispic = "N"
I _pic = request. form ("InsertImage ")
I _body = replace (I _body, "contentEditable = true", "contentEditable = false ")
'Get Pages, B = Body
B _Len = Len (I _Body)
B _Pages = 1
T = Temp
T_Loop = true
Do While T_Loop here loop multiple times, every 4000 points one page, calculate the page number and add it to the database.
If B _Len> 4000 then
N_Body = Left (I _Body, 4000) 'n' = New
'If "<P" in N_Body, Else ">" in N_Body
If limit Rev (N_Body, "<P")> 0 and (Len (N_Body)-Limit Rev (N_Body, "<P") <400 then
This article is an English version of an article which is originally in the Chinese language on aliyun.com and is provided for information purposes only. This website makes no representation or warranty of any kind, either expressed or implied, as to the accuracy, completeness ownership or
reliability of the article or any translations thereof. If you have any concerns or complaints relating to the article, please send an email, providing a detailed description of the concern or
complaint, to email@example.com. A staff member will contact you within 5 working days. Once verified, infringing content will be removed immediately.
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:
and provide relevant evidence. A staff member will contact you within 5 working days.