归纳总结病例
This commit is contained in:
@@ -201,6 +201,30 @@ function proofState($article_id)
|
||||
$p_article_obj->where('article_id', $article_id)->where('state', '<>', 1)->where('proof_etime', '<', time())->where('proof_state', 1)->update(['proof_state' => 2]);
|
||||
}
|
||||
|
||||
|
||||
function docxReader($file){
|
||||
$phpWord = IOFactory::load($file);
|
||||
$content = '';
|
||||
foreach ($phpWord->getSections() as $section) {
|
||||
foreach ($section->getElements() as $element) {
|
||||
if ($element instanceof \PhpOffice\PhpWord\Element\TextRun) {
|
||||
foreach ($element->getElements() as $text) {
|
||||
if ($text instanceof \PhpOffice\PhpWord\Element\Text) {
|
||||
$content .= $text->getText();
|
||||
}
|
||||
}
|
||||
$content .= ";";
|
||||
}
|
||||
elseif ($element instanceof \PhpOffice\PhpWord\Element\Text) {
|
||||
$content .= $element->getText() . ";";
|
||||
}
|
||||
}
|
||||
}
|
||||
return $content;
|
||||
|
||||
}
|
||||
|
||||
|
||||
function readWordImg($article_id,$file){
|
||||
$phpWord = IOFactory::load($file);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user