php 生成二维码

需要自己去下载,只需要 phpqrcode.php 就行了

https://github.com/t0k4rt/phpqrcode

 

引入:

require_once('../phpqrcode.php');

使用例子:

$str = 'hello world';
$file_path  = $_SERVER["DOCUMENT_ROOT"] . "/test/test.png";
\QRcode::png($str,$file_path,'L',3);

 

posted @ 2021-12-01 16:51  一剑还  阅读(57)  评论(0编辑  收藏  举报