Skip to content

Commit 243caec

Browse files
committed
V1.10.1版本
1 parent 7d0240b commit 243caec

4 files changed

Lines changed: 22 additions & 14 deletions

File tree

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,10 @@ V免签为完全开源项目,开源项目意味着作者没有任何收入来
122122
+ 微信店员收款推送通知
123123

124124
## 更新记录
125-
125+
+ v1.11(2019.10.28)
126+
+ 修复上传二维码一直卡在处理中
127+
+ 如二维码无法正常识别,请给/public/qr-code/test.php设置777权限
128+
126129
+ v1.10.1(2019.09.16)
127130
+ 增加版本更新提示
128131

config/app.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,5 +142,5 @@
142142
'show_error_msg' => false,
143143
// 异常处理handle类 留空使用 \think\exception\Handle
144144
'exception_handle' => '',
145-
'ver' => '1.10.1',
145+
'ver' => '1.11',
146146
];

public/qr-code/test.php

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
error_reporting(0);
23
ini_set ('memory_limit', '256M');
34
header("Content-type:text/html;charset=utf-8");
45

@@ -8,6 +9,8 @@
89
echo "error";
910
exit();
1011
}
12+
13+
1114
function getCurl($url, $post = 0, $cookie = 0, $header = 0, $nobaody = 0)
1215
{
1316
$ch = curl_init();
@@ -42,19 +45,21 @@ function getCurl($url, $post = 0, $cookie = 0, $header = 0, $nobaody = 0)
4245
}
4346

4447

45-
if (isset($_POST['base64'])){
46-
$b64 = $_POST['base64'];
47-
$s = base64_decode($b64);
48-
$img_path = './image/'.md5($s).'.jpg';
49-
file_put_contents($img_path, $s,LOCK_EX);
50-
}else{
51-
$s = file_get_contents($_FILES["file"]["tmp_name"]);
52-
$img_path = './image/'.md5($s).'.jpg';
53-
file_put_contents($img_path, $s,LOCK_EX);
54-
}
55-
$url='http://'.$_SERVER['SERVER_NAME'].str_replace("/test.php","",$_SERVER["REQUEST_URI"]).str_replace("./","/",$img_path);
5648

5749
try{
50+
if (isset($_POST['base64'])){
51+
$b64 = $_POST['base64'];
52+
$s = base64_decode($b64);
53+
$img_path = './image/'.md5($s).'.jpg';
54+
file_put_contents($img_path, $s,LOCK_EX);
55+
}else{
56+
$s = file_get_contents($_FILES["file"]["tmp_name"]);
57+
$img_path = './image/'.md5($s).'.jpg';
58+
file_put_contents($img_path, $s,LOCK_EX);
59+
}
60+
$url='http://'.$_SERVER['SERVER_NAME'].str_replace("/test.php","",$_SERVER["REQUEST_URI"]).str_replace("./","/",$img_path);
61+
62+
5863
$res = getCurl("https://cli.im/apis/up/deqrimg","img=".urlencode($url));
5964
$obj = json_decode($res);
6065
$text = $obj->info->data[0];

ver

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.10.1|2019-09-16
1+
1.11|2019-10-28

0 commit comments

Comments
 (0)