作者 杨育虎

解决自动生成数据词典导出报错问题

... ... @@ -104,9 +104,7 @@ class AdminIndexController extends PluginBaseController
}
$html .= "</tbody></table>";
}
require EXTEND_PATH.'word/Word.class.php';
$word = new \word();
$word->start();
$this->start();
$wordname=config('database.database').'.doc';
echo $html;
@header('Content-type:application/word');
... ... @@ -116,4 +114,13 @@ class AdminIndexController extends PluginBaseController
flush();
}
protected function start(){
ob_start();
echo '<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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<xml><w:WordDocument><w:View>Print</w:View></xml>
</head><body>';
}
}
\ No newline at end of file
... ...