init
This commit is contained in:
22
core/qrcode.php
Normal file
22
core/qrcode.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @copyright (C)2016-2099 Hnaoyun Inc.
|
||||
* @author XingMeng
|
||||
* @email hnxsh@foxmail.com
|
||||
* @date 2017年12月24日
|
||||
* 二维码生成
|
||||
*/
|
||||
|
||||
// 绘制二维码图片
|
||||
function draw_qcode($string)
|
||||
{
|
||||
require dirname(__FILE__) . '/extend/qrcode/phpqrcode.php'; // 引入类文件
|
||||
QRcode::png($string, false, 'M', 6, 1); // 生成二维码图片
|
||||
}
|
||||
|
||||
if (isset($_GET['string']) && $string = $_GET['string']) {
|
||||
draw_qcode($string);
|
||||
} else {
|
||||
die('地址必须传入string参数!');
|
||||
}
|
||||
Reference in New Issue
Block a user