您好,欢迎访问一九零五行业门户网

PHP教程实例:用PHP脚本生成word文档的程序

php生成word文档的代码,这个是用来生产试卷的简单php代码
试卷生成
include('head.php');
require ('dbconnect.php');
?>
difficulty.
;
$cout.=   .$row->content.
;
}//while ?>
http://www.w3.org/tr/rec-html40>';
} function save($path)
{
print ;
$data = ob_get_contents();
ob_end_clean();
$this->wirtefile ($path,$data);
}
function wirtefile ($fn,$data)
{
$fp=fopen($fn,wb);
fwrite($fp,$data);
fclose($fp);
}
}
/*-------word class end-------*/
$word=new word;
$word->start();
echo $cout;
$wordname=word/.time()..doc;
$word->save($wordname);//保存word并且结束.
?>
试卷已经生成,请点击这里查看
您输入的条件不足,请重新输入!
其它类似信息

推荐信息