资 源 简 介
Invariably, there comes a time when a web content producer has large amounts of text content in a Microsoft Word, or some other pre-formatted document format. Copying and pasting text from a Word document can lead to multiple character set inconsistencies both in databases and when output to a web page. It can be cumbersome and time consuming to go through and replace invalid characters with their valid equivalents or entity references.
Sometimes, you might also be required to code up static pages and dread the thought of wrapping every paragraph in a paragraph tag, or finding every URL and/or email address and turning them into a hyperlink.
This project provides a small PHP class and an HTML interface to act as a web-based document cleaner.
The class itself is pretty simple, with only 2 public method (to do the actual cleaning and to prepare a group of form variables).
See an example at http://code.antnest.org/cleaner
Hope you find it useful!