PHP生成word文档的代码
时间:2008-04-18 来源:剑心通明
[url=javascript:;]PHP[/url]
生成word文档的
[url=javascript:;]代码[/url]
,这个是用来生产试卷的简单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">试卷已经生成,请点击这里查看
您输入的条件不足,请重新输入!
相关阅读 更多 +