<?php //引入 phpqrcode 类库 //phpqrcode下载地址:https://github.com/t0k4rt/phpqrcode require_once "phpqrcode/qrlib.php"; //拼接内容 $content = "BEGIN:VCARD" . "\n";//开始 $content .= "VERSION:2.1" . "\n";//版本 $content .= "N:张" . "\n";//姓 $content .= "FN:三" . "\n";//名 $content .= "ORG:51CTO" . "\n";//组织名称 $content .= "TEL;WORK;VOICE:1234567" . "\n";//工作电话 $content .= "TEL;HOME;VOICE:12345678" . "\n";//家庭电话 $content .= "TEL;TYPE=cell:12345678901" . "\n";//移动电话 $content .= "ADR;HOME:;;德外大街;西城区;北京市;433330;中国" . "\n";//家庭住址 $content .= "EMAIL:[email protected]" . "\n";//邮箱 $content .= "URL:https://www.baidu.com" . "\n"; //个人主页 $content .= "END:VCARD";//结束 //输出二维码 QRcode::png($content); ?>
生成的二维码
扫描出的信息
时间: 2024-10-20 23:41:24