|
|
@@ -1949,8 +1949,12 @@ class OrderClass extends BaseClass
|
|
|
XL;
|
|
|
$file = $dir . $orderSn . '.html';
|
|
|
$imgFile = $dir . $orderSn . '.png';
|
|
|
- unlink($file);
|
|
|
- unlink($imgFile);
|
|
|
+ if (file_exists($file)) {
|
|
|
+ unlink($file);
|
|
|
+ }
|
|
|
+ if (file_exists($imgFile)) {
|
|
|
+ unlink($imgFile);
|
|
|
+ }
|
|
|
file_put_contents($file, $content);
|
|
|
$con = new Converter(null, [
|
|
|
"fmt" => "png",
|
|
|
@@ -1958,7 +1962,6 @@ XL;
|
|
|
"out" => $imgFile,
|
|
|
]);
|
|
|
$con->convert();
|
|
|
-
|
|
|
return ['imgFile' => $imgFile];
|
|
|
}
|
|
|
|