Using filesystem components to implement local-specific printing in Web applications

Source: Internet
Author: User
1. Introduction
With the rapid development of Internet, many enterprises have developed a web-based business application system. Under normal circumstances, web-based business applications are three-tier or three-tier structure, the front is the client is a common web browser, the intermediary business logic application layer on the Web server, by the Web Server service artifacts access to the background database. To interconnect the business system with the Internet, both the Web server and the database system are hosted in the IDC (Internet Data Center), which requires the extraction of business data from the hosted server on IDC for local printout. In the case where the client browser can only print simple HTML pages, it requires a more powerful and flexible print output, and expands the browser's functionality by using related technologies to enable more complex data printing tasks such as receipts, receipts, and more. The author used the FileSystem component to realize the functions of collecting vouchers and admission ticket in local printing for a network education company when developing educational management software.
2, filesystem component use Introduction
The filesystem component is actually an ActiveX control that exists in the Windows platform (either Win98, Win2000, or NT environments contain the component.) ), clsid:0d43fe01-11cf-8940-00a0c9054228. Familiarity with ASP programmers may have used the filesystem component, which is typically used on the server side to access and control text files, folders, and drives. There are two ways to create an object instance of a filesystem component:
1, use the ASP's built-in Object Server method Server.CreateObject to create an instance of the server-side object.
2. Use the VBScript script function CreateObject to create an instance of the client object (or you can use the method on the server side, but sometimes it will be wrong, generally not used;).
The filesystem component operates on a text file in the following ways:
CreateTextFile (Filename,[overwrite if EXISTS],[UNICODE/ASCII])//Create a text file
OpenTextFile (Filename,[input/output mode],[create if not Exists],[format])//Open Text file
CopyFile (Filename1,filename2,[overwrite])//Copy text file
MoveFile (filename1,filename2)//Move text file
DeleteFile (Filename)//Delete text file
GetFile (Filename)//Get text file
FileExists (Filename)//To determine whether a text file exists
The filesystem component also has a way with folders and drives that are similar to text files, and don't repeat them here.
In fact, the filesystem component can also be used for clients, and the second way to create a FileSystem Component object instance is to access and control the text files, folders, and drives of the client system. Because the Microsoft platform has filesystem components, the client on the Microsoft platform does not need to download from a remote server, installs and registers itself when the operating system is installed, and installs Plug-ins and downloads filesystem components for clients on other platforms.

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.