標籤:php
<?php//引入 phpqrcode 類庫//phpqrcode:https://github.com/t0k4rt/phpqrcoderequire_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);?>
產生的二維碼
650) this.width=650;" src="https://s2.51cto.com/wyfs02/M01/9E/41/wKiom1mNVTbSvuJIAAAIdPnwn00864.png" title="產生的二維碼" alt="wKiom1mNVTbSvuJIAAAIdPnwn00864.png" />
掃描出的資訊
650) this.width=650;" src="https://s2.51cto.com/wyfs02/M00/9E/42/wKiom1mNV9GTtaMlAAJUdfiCeiQ123.jpg" title="Screenshot_2017-08-11-15-05-39.jpg" width="350" height="673" border="0" hspace="0" vspace="0" style="width:350px;height:673px;" alt="wKiom1mNVXbBLmXYAAJUeGtTcH8339.jpg" />
本文出自 “佟鑫的部落格” 部落格,請務必保留此出處http://tong707.blog.51cto.com/12527988/1955464
PHP產生電子名片(QRCode)