生成url的二维码图片

    <?php

    require_once "./phpqrcode.php";
    //生成二维码
    $img = \QRcode::png("https://www.baidu.com");
    var_dump($img);
    die;

  ?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <img src="<?php echo $img;?>" alt="" width="100">
</body>
</html>

domo的下载地址:

链接:https://pan.baidu.com/s/1jLw2gOZkHppxqYQSt4f4LA
提取码:fcu4

posted @ 2019-07-20 17:25  HaimaBlog  阅读(1205)  评论(0编辑  收藏  举报