PHP生成word文档格式试卷的代码
By admin
- One minute read - 49 wordsPHP生 成word文档的代码,这个是用来生产试卷的简单PHP代码
以下为引用的内容:试卷生成 difficulty.”
”; $cout.=” “.$row->content.”
”; }//while
?> ’; }
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并且结束. ?>
” target=_blank class=”unnamed1″>试卷已经生成,请点击这里查看
您输入的条件不足,请重新输入!