Directly use PHP to create word document code (the system does not need to install word software). How to use: First, use $word->start() to indicate that a word file is to be generated. Then you can output any HTML code, whether you read it from the file and write it here, or output the HTML directly here, it doesn't matter.
Directly use the PHP tutorial to create the word document code (the system does not need to install word software)
Usage:
First use $word->start() to indicate that the word file is to be generated. Then you can output any html code, whether you read it from the file and write it here, or output html directly here, it doesn't matter.
After you finish outputting, use the $word->save($path) method, where $path is the name of the word file you want to generate (the complete path can be given). When you use $word- >After the save() method, any subsequent output has nothing to do with the word file, which means that the word generation work is completed. Then just pull it the same way you normally use php. Whatever you output will be output directly in the browser and will not be written into Word.
*/
class word
{function start()
{
ob_start();
print'< ;html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www .w3.org/tr/rec-html40">';}
function save($path)
{print "