Home > Article > Backend Development > Use php to generate QR code electronic business cards
Today, when QR codes are widely used, how to make yourself a QR code electronic business card? This article will guide you to use PHP to generate your own QR code electronic business card.
Without further ado, let’s get straight to the code. (phpqrcode used)
<?php include "phpqrcode/qrlib.php"; $content='BEGIN:VCARD'."\n"; $content.='VERSION:2.1'."\n"; $content.='N:张'."\n"; $content.='FN:三'."\n"; $content.='ORG:**公司'."\n"; $content.='TEL;WORK;VOICE:18868881111'."\n"; $content.='TEL;HOME;VOICE:18868881112'."\n"; $content.='TEL;TYPE=cell:18868881113'."\n"; $content.='ADR;HOME:;;德外大街10号;西城区;北京市;400000;中国'."\n"; $content.='EMAIL:hr@imooc.com'."\n"; $content.='URL:http://www.imooc.com'."\n"; $content.='END:VCARD'."\n"; QRcode::png($content); ?>
Related recommendations:
PHP generates an example of QR code with LOGO image based on phpqrcode
##Using Thinkphp3.2 combined with phpqrcode to generate QR code
The above is the detailed content of Use php to generate QR code electronic business cards. For more information, please follow other related articles on the PHP Chinese website!