首页
关于小站
朋友
时光之书
笔顺字帖
LayUI手册
元素周期表
Search
1
【PHP】PHPoffice/PHPSpreadsheet读取和写入Excel
2,287 阅读
2
【Layui】控制页面元素展示隐藏
2,095 阅读
3
【Git】No tracked branch configured for branch master or the branch doesn't exist.
2,017 阅读
4
【PHP】PHP实现JWT生成和验证
2,005 阅读
5
【composer】composer常用命令
1,812 阅读
默认分类
PHP
ThinkPHP
Laravel
面向对象
设计模式
算法
基础
网络安全
webman
swoole
Web
HTML
CSS
JavaScript
jQuery
Layui
VUE
uni-app
Database
MySQL
Redis
RabbitMQ
Nginx
Git
Linux
Soft Ware
Windows
网赚
Go
Docker
Elasticsearch
登录
Search
标签搜索
PHP
函数
方法
类
MySQL
ThinkPHP
JavaScript
OOP
Layui
Web
Server
Nginx
Docker
PHPSpreadsheet
PHPoffice
Array
设计模式
Git
排序算法
基础
小破孩
累计撰写
268
篇文章
累计收到
13
条评论
首页
栏目
默认分类
PHP
ThinkPHP
Laravel
面向对象
设计模式
算法
基础
网络安全
webman
swoole
Web
HTML
CSS
JavaScript
jQuery
Layui
VUE
uni-app
Database
MySQL
Redis
RabbitMQ
Nginx
Git
Linux
Soft Ware
Windows
网赚
Go
Docker
Elasticsearch
页面
关于小站
朋友
时光之书
笔顺字帖
LayUI手册
元素周期表
搜索到
1
篇与
的结果
2022-06-21
【PHP】扩展 qrcode 二维码生成
**一、执行命令安装** composer require dh2y/think-qrcode **二、require安装** thinkphp5.0 安装 "require": { "dh2y/think-qrcode":"1.*" }, thinkphp5.1 安装 "require": { "dh2y/think-qrcode":"2.*" }, **三、autoload psr-4标准安装** a) 进入vendor/dh2y目录 (没有dh2y目录 mkdir dh2y) b) git clone c) 修改 git clone下来的项目名称为think-qrcode d) 添加下面配置 "autoload": { "psr-4": { "dh2y\\qrcode\\": "vendor/dh2y/think-qrcode/src" } }, e) php composer.phar update **添加配置文件** return [ 'cache_dir' => 'uploads'.DS.'qrcode', //缓存地址 'background'=> 'static/image/icon_cover.png' //背景图 ]; **使用方法** $code = new QRcode(); $code_path = $code->png($register_url) //生成二维码 ->logo('static/image/avatar-m.jpg') //生成logo二维码 ->background(180,500) //给二维码加上背景 ->text($role,20,['center',740],'#ff4351') //添加文字水印 ->text($nick_name,20,['center',780],'#000000') ->getPath(); //获取二维码生成的地址
2022年06月21日
282 阅读
0 评论
0 点赞