|
@@ -38,8 +38,20 @@ class Api
|
|
|
|
|
|
if ($logo) {
|
|
|
$logo = Dever::local($logo);
|
|
|
- $QR = imagecreatefromstring(file_get_contents($file));
|
|
|
- $logo = imagecreatefromstring(file_get_contents($logo));
|
|
|
+ if (strstr($file, 'http')) {
|
|
|
+ $file_string = Dever::curl($file);
|
|
|
+ } else {
|
|
|
+ $file_string = file_get_contents($file);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (strstr($logo, 'http')) {
|
|
|
+ $logo_string = Dever::curl($logo);
|
|
|
+ } else {
|
|
|
+ $logo_string = file_get_contents($logo);
|
|
|
+ }
|
|
|
+
|
|
|
+ $QR = imagecreatefromstring($file_string);
|
|
|
+ $logo = imagecreatefromstring($logo_string);
|
|
|
$QR_width = imagesx($QR);//二维码图片宽度
|
|
|
$QR_height = imagesy($QR);//二维码图片高度
|
|
|
$logo_width = imagesx($logo);//logo图片宽度
|