PHP QR code generator

巴扎黑
Release: 2016-11-12 09:42:19
Original
1818 people have browsed it

PHP QR Code Generator

(1) Download the PHP QR Code class library from the official website, download the source file and extract it to the phpqrcode directory.

(2) Create the script file create_png.php and add a user form on the page. The code is as follows:

Input text:

Please select the size:

(3) Continue to add PHP operations to the page The code is as follows:

inlcude_once('../phpqrcode/qrlib.php'); //Introducing an external class library

if($_POST['info']){ //Receive the form Value

$temp='./images/'; //Define the QR code image path

$filename=time()."test.png"; filename;                              // Generate a complete directory

QRcode::png($_POST['info'],$filename,"L",$_POST['size']);//Create a QR code based on parameters

echo" "; //Show pictures

}

?>

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!