This time for you to bring PHP to generate two-dimensional Code poster case analysis, PHP generated two-dimensional code poster note what, the following is the actual case, together to see.
Add Template:
1, qrcode.*** the beginning of the folder, such as: QRCODE.DEMOABC
2, in the first step to create a folder in the configuration file config.php, the above example is: qrcode.demoabc/config.php
<?phpreturn Array (//QR code section ' Level ' = ' l ',//two-D code correction levels, optional: L, M, Q, H ' matrix ' = + 6,//matrix size, 1-10 ' type ' = ' png ',//Two Dimensional code Output Type/** * Picture file Description: (in the parent directory) * [SKIN]: will replace the current template folder */' background ' = ' [skin]demo.png ',/** * template path Description: (In the installation path /vendor/qrcode-diy/, domain name http://localhost/for example) * [Web_root]: http://localhost/* [Web_path]: vendor/qrcode- diy/* [Web_uri]: http://localhost/vendor/qrcode-diy/* [KEY]: Must be reserved for the replacement of the final invitation code */' template ' = ' [web_ Uri]test.php?qrcode=[key]&skin=skin2&page=share ',///landing page path template ' x ' = 228,//insertion point x position ' y ' = + 77,//insertion point y position ' W ' + 88,//two-dimensional code width ' h ' = 88,//two D-code height//Print text section, if you do not need to print text, the following can be omitted/** * Font path Description: (in the parent directory) * [SKIN]: will replace the current template folder * * ' Font ' = ' [Skin]arial.ttf ',/** * Output text description: * [KEY]: Must be retained to replace the final invitation code */' Text ' = ' [key] ', ' textsize ' + 14 ,//Matrix size, 5-50 ' textx ' = 138,//text insertion point X position ' texty ' + 369,//font baseline position (position at bottom of font) ' TextColor ' + ' #FFFFFF ',//font color);? >
Effect Demo
Believe that you have read the case of this article you have mastered the method, more exciting please pay attention to the PHP Chinese network other related articles!
Recommended reading:
Php+ajax to get the news data case detailed
PHP Curl batch to implement a controllable concurrent asynchronous operation case study