Cracking Web Publishing system ASP generation static Page method

Source: Internet
Author: User
static | crack | page

1, Withtemplet meaning is that the generated page schema will adopt a set of templates, which I introduced in a tutorial before, I hope you see this tutorial on the ASP template should be familiar with.

2, ASP converted to HTML. Don't let me talk about the benefits of ASP's transition to HTML, which is most worth knowing: static HTML pages and dynamic page pairs are much less demanding, and, similarly, static HTML searches are far more likely than dynamic pages.

So the technical problem I need to deal with right now is:

1, how to implement template technology?

2, how to achieve 2HTML technology?

3. How to combine template technology with 2HTML technology?

   first, the technical principle analysis

1, the template technology refer to

2, how to make the ASP page into HTML? The FSO component is generally thought of, because the component can create any new file format.

So what is the whole process of running?

A, the provision of information input page for information collection;

b, the acceptance information value first save, and then the FSO to generate files;

C, technical completion of the task to display the newly created HTML file path address. There are several difficulties in the implementation of this technology:

I, the FSO generated files are directly placed in a large folder, or in a separate daily update subfolder? may be inaccurate, so understand: believe that the file generated through the FSO over time, the file will be more and more, management will be more and more chaotic ... Usually you may see some addresses such as www.xxx.com/a/2004-5-20/200405201111.html can be analyzed to create the current date of the folder. In this way, a day is a folder page content, view management also seems more reasonable.

II, when I tried to create a folder through the above method, I found a second problem. The first time through the FSO to create a folder named after the current date, no problem. When I have a new file to build, because it is the same program, it will execute the same folder. At this point, the FSO component will find that the path already exists ... Jam-_-! continue processing, add code to the first line:

Reference:

OnErrorResumeNext
Achieve the effect of self-deception and deception.

Of course the use of the rules is to determine whether the folder has no

Reference:

<%
Setfso=Server.CreateObject("Scripting.FileSystemObject")
if(fso.FolderExists(Server.MapPath(folder)))then
'判断如果存在就不做处理
else
'判断如果不存在则建立新文件夹
fso.CreateFolder(Server.MapPath(folder))
endif
%>

III, the folder is established, how to establish the document? This is mainly the generation of file names. Of course, this will need to write a function of its own, the function is how to generate file name:

Reference:

<%
functionmakefilename(fname)
fname=fname'前fname为变量,后fname为函数参数引用
fname=replace(fname,"-","")
fname=replace(fname,"","")
fname=replace(fname,":","")
fname=replace(fname,"PM","")
fname=replace(fname,"AM","")
fname=replace(fname,"上午","")
fname=replace(fname,"下午","")
makefilename=fname&".html"
endfunction
%>

The reference function is:

<%fname=makefilename(now())%>
In fact, is the date of the day and the minutes of the name of the file.

IV, and finally, how are the generated files viewed? Of course, you need to save the path to the generated file and add it to the corresponding recordset. Of course, this is mentioned in the design below.

3. Combination of template technology and 2HTML technology: Replace the value of special code in the template with the values received from the form, complete the template function, and generate HTML files for all the template codes that are eventually replaced. Note that the substitution should be able to completely change the format of the input data or the code that supports UBB.



Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.