Php generates a QRcode instance. Php generates a QRcode instance. this example describes how php generates a QRcode instance. Is a very useful feature. Share it with you for your reference. For details, see figure 5. QRcode instance generated by php.
This example describes how to generate a QRcode instance using php. Is a very useful feature. Share it with you for your reference. The details are as follows:
Shows the instance demo effect:
The main function code is as follows:
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
Ini_set ('display _ errors ', 'on '); $ PNG_TEMP_DIR = dirname (_ FILE _). DIRECTORY_SEPARATOR. 'temp '. DIRECTORY_SEPARATOR; $ PNG_WEB_DIR = 'temp /'; Include "qrlib. php"; // QRcode lib $ Data = 'Demo qrcode'; // data $ Ecc = 'h'; // L-smallest, M, Q, H-best $ Size = 10; // 1-50 $ Filename = paipng_temp_dir.'qrcode_'.time().'.png '; QRcode: png ($ data, $ filename, $ ecc, $ size, 2 ); Chmod ($ filename, 0777 ); Echo ''; ?> |
Examples in this article describes how to generate a QRcode instance using php. Is a very useful feature. Share it with you for your reference. The demo result is as follows...