Algorithm and application direction of ASP retrieving Web site-specific directory files

Source: Internet
Author: User
There is a problem with many of our web sites, is the link maintenance update, this is a very heavy work, if not the dedicated staff to maintain the large web site, the normal site of the site update maintenance work has become a very troubling problem, especially in the absence of a lot of manpower, It is more annoying to maintain updated links frequently, because the job is not creative, it's time-consuming, and Jack is obviously not the kind of person who likes to spend a lot of time on something that's not creative, and yes, Jack came up with an ASP's program prototype, let it do the work we hate!
Now let's assume that you have such a website maintenance task, is to link each month's economic commentary in a compartmentalized way for everyone to look at, which covers all aspects of the economy, may have a GDP, a price index, an industrial development, and they have a common character, Is their file name represents the content of their comments, for example: "XX City 1999 gross domestic product completion analysis", under so many appropriate assumptions (giggle, assume almost more than Samuelson's economics!) We have a chance to steal it! All we have to do is copy these files into the comments directory subdirectory, and then write an ASP page, the function of which is to retrieve the files under the specified directory, and retrieve the results to make a clickable link, so how should we write?
Very simple, we simply let the ASP give the specified directory of the file name set, and traverse the collection, the collection of each element into the corresponding links for everyone to choose the line! Also, to query all the economic categories for all file names that contain a feature string? Little Case! All you have to do is put the function of retrieving the file into a recursive directory retrieval function. (Hey, don't tell me you're not going to pass it on!) )
In this way, we can also write a song system (hee, I like to listen to MP3) the singer into the directory name, the song plus Chinese name, all OK! Want to hear A "Love" song? Ok! Enter the Love word! You can find all the songs you love! (Say: Love you love into the bone!) Hey, chop Band! Jack the lead singer! )
In addition, you add the extension code (delete the specified file code), if with upload ASP code, you can even write a remote Web maintenance system! Of course, this kind of thing is not done by Jack! ASP is not perfect, the binary file read and write can not do! So you can only manipulate text files, Hee, the dream is gone? It doesn't matter, use VC! Write ISAPI can do it!
The following code, due to the integrity of the comments (Jack did not surf the internet in the afternoon to write it!) Hey, I do not know how many mm in the chat waiting for my heartache! , I will not say more, please analyze your own!
<%
' Get the string to be included in the name of the file you want to query from the form variable set
Data=request.form ("Search_data")
' Call function query all subdirectories (all subtrees) under the target query directory

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.