|
@@ -719,18 +719,18 @@ class utils {
|
|
|
return $result;
|
|
return $result;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // public static function hasMacro($filename) {
|
|
|
|
|
- // $zip = new ZipArchive();
|
|
|
|
|
- // if ($zip->open($filename) === TRUE) {
|
|
|
|
|
- // if ($zip->locateName('word/vbaProject.bin') !== false) {
|
|
|
|
|
- // return true;
|
|
|
|
|
- // } else {
|
|
|
|
|
- // return false;
|
|
|
|
|
- // }
|
|
|
|
|
- // $zip->close();
|
|
|
|
|
- // }
|
|
|
|
|
- // return false; // 没有发现VBA宏
|
|
|
|
|
- // }
|
|
|
|
|
|
|
+ public static function hasMacro($filename) {
|
|
|
|
|
+ $zip = new ZipArchive();
|
|
|
|
|
+ if ($zip->open($filename) === TRUE) {
|
|
|
|
|
+ if ($zip->locateName('word/vbaProject.bin') !== false) {
|
|
|
|
|
+ return true;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ $zip->close();
|
|
|
|
|
+ }
|
|
|
|
|
+ return false; // 没有发现VBA宏
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
// public static function hasMacro2($filename){
|
|
// public static function hasMacro2($filename){
|
|
|
// require 'D:\code\php\Customer_Service_Online\thirdparty_vendors\vendor\autoload.php';
|
|
// require 'D:\code\php\Customer_Service_Online\thirdparty_vendors\vendor\autoload.php';
|