This is PHP implementation of QR Code 2-D barcode generator. It is pure-php LGPL-licensed implementation based on C libqrencode by Kentaro Fukuchi. == LICENSING == Copyright (C) 2010 by Dominik Dzienia This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License (LICENSE file) for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA == INSTALATION AND USAGE == * INSTALL file * http://sourceforge.net/apps/mediawiki/phpqrcode/index.php?title=Main_Page == CONTACT == Fell free to contact me via e-mail (deltalab at poczta dot fm) or using folowing project pages: * http://sourceforge.net/projects/phpqrcode/ * http://phpqrcode.sourceforge.net/ == ACKNOWLEDGMENTS == Based on C libqrencode library (ver. 3.1.1) Copyright (C) 2006-2010 by Kentaro Fukuchi http://megaui.net/fukuchi/works/qrencode/index.en.html QR Code is registered trademarks of DENSO WAVE INCORPORATED in JAPAN and other countries. Reed-Solomon code encoder is written by Phil Karn, KA9Q. Copyright (C) 2002, 2003, 2004, 2006 Phil Karn, KA9Q 参数说明: $_REQUEST['data'] = '123456789asdf'; $level = 'L';// 纠错级别:L、M、Q、H $size = 6;// 点的大小:1到10,用于手机端4就可以了 QRcode::png($_REQUEST['data'], $filename, $errorCorrectionLevel, $matrixPointSize, 2); 1.第一个参数$text,就是上面代码里的URL网址参数, 2.第二个参数$outfile默认为否,不生成文件,只将二维码图片返回,否则需要给出存放生成二维码图片的路径 3.第三个参数$level默认为L,这个参数可传递的值分别是L(QR_ECLEVEL_L,7%),M(QR_ECLEVEL_M,15%),Q(QR_ECLEVEL_Q,25%),H(QR_ECLEVEL_H,30%)。这个参数控制二维码容错率,不同的参数表示二维码可被覆盖的区域百分比。利用二维维码的容错率,我们可以将头像放置在生成的二维码图片任何区域。 4.第四个参数$size,控制生成图片的大小,默认为4 5.第五个参数$margin,控制生成二维码的空白区域大小 6.第六个参数$saveandprint,保存二维码图片并显示出来,$outfile必须传递图片路径。
版权声明:
1、该文章(资料)来源于互联网公开信息,我方只是对该内容做点评,所分享的下载地址为原作者公开地址。2、网站不提供资料下载,如需下载请到原作者页面进行下载。
3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考学习用!
4、如文档内容存在违规,或者侵犯商业秘密、侵犯著作权等,请点击“违规举报”。