小bug修复
This commit is contained in:
@@ -43,6 +43,20 @@ function readExcel($file){
|
||||
return $dataset;
|
||||
}
|
||||
|
||||
function readDocx($file){
|
||||
$phpWord = IOFactory::load($file);
|
||||
$frag = [];
|
||||
foreach ($phpWord->getSections() as $section) {
|
||||
foreach ($section->getElements() as $element) {
|
||||
if (method_exists($element, 'getText')) {
|
||||
// echo $element->getText() . "\n";
|
||||
$frag[] = $element->getText();
|
||||
}
|
||||
}
|
||||
}
|
||||
return $frag;
|
||||
}
|
||||
|
||||
/**
|
||||
* @function sendEmail
|
||||
* @intro 发送邮件(带附件)
|
||||
|
||||
Reference in New Issue
Block a user