Skip to content

Commit

Permalink
V1.10.1版本
Browse files Browse the repository at this point in the history
  • Loading branch information
szvone committed Oct 28, 2019
1 parent 7d0240b commit 243caec
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 14 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,10 @@ V免签为完全开源项目,开源项目意味着作者没有任何收入来
+ 微信店员收款推送通知

## 更新记录

+ v1.11(2019.10.28)
+ 修复上传二维码一直卡在处理中
+ 如二维码无法正常识别,请给/public/qr-code/test.php设置777权限

+ v1.10.1(2019.09.16)
+ 增加版本更新提示

Expand Down
2 changes: 1 addition & 1 deletion config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,5 @@
'show_error_msg' => false,
// 异常处理handle类 留空使用 \think\exception\Handle
'exception_handle' => '',
'ver' => '1.10.1',
'ver' => '1.11',
];
27 changes: 16 additions & 11 deletions public/qr-code/test.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
error_reporting(0);
ini_set ('memory_limit', '256M');
header("Content-type:text/html;charset=utf-8");

Expand All @@ -8,6 +9,8 @@
echo "error";
exit();
}


function getCurl($url, $post = 0, $cookie = 0, $header = 0, $nobaody = 0)
{
$ch = curl_init();
Expand Down Expand Up @@ -42,19 +45,21 @@ function getCurl($url, $post = 0, $cookie = 0, $header = 0, $nobaody = 0)
}


if (isset($_POST['base64'])){
$b64 = $_POST['base64'];
$s = base64_decode($b64);
$img_path = './image/'.md5($s).'.jpg';
file_put_contents($img_path, $s,LOCK_EX);
}else{
$s = file_get_contents($_FILES["file"]["tmp_name"]);
$img_path = './image/'.md5($s).'.jpg';
file_put_contents($img_path, $s,LOCK_EX);
}
$url='http://'.$_SERVER['SERVER_NAME'].str_replace("/test.php","",$_SERVER["REQUEST_URI"]).str_replace("./","/",$img_path);

try{
if (isset($_POST['base64'])){
$b64 = $_POST['base64'];
$s = base64_decode($b64);
$img_path = './image/'.md5($s).'.jpg';
file_put_contents($img_path, $s,LOCK_EX);
}else{
$s = file_get_contents($_FILES["file"]["tmp_name"]);
$img_path = './image/'.md5($s).'.jpg';
file_put_contents($img_path, $s,LOCK_EX);
}
$url='http://'.$_SERVER['SERVER_NAME'].str_replace("/test.php","",$_SERVER["REQUEST_URI"]).str_replace("./","/",$img_path);


$res = getCurl("https://cli.im/apis/up/deqrimg","img=".urlencode($url));
$obj = json_decode($res);
$text = $obj->info->data[0];
Expand Down
2 changes: 1 addition & 1 deletion ver
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.10.1|2019-09-16
1.11|2019-10-28

0 comments on commit 243caec

Please sign in to comment.