简体   繁体   中英

Generate Batch of QR codes using phpqrcode library

Im using phpqrcode library to generate the qrcode.

for($i=1;$i<=600;$i++){
   $fileName = 'qrcode_name' . $i . '.png';
   QRcode::png($i, $fileName); 
}

If i want to display all those qr codes in webpage instead of storing in a file, im using this code,

QRcode::png("VALUE");

But how can make to code to display all the QR code at once in my webpage, instead of storing it in intermediate file.

Is it possible to do like that?

As you know, the phpqrcode library save png file in the server, the save path is a local physical path, to display the png file, you should convert the local physical path to web path. For example: if you save all the qrcode png file in D:/web_root/qrcode/image/1.png, ...etc. and your web domain is http://www.example.com/ , you should convert the above local path to web path as http://www.example.com/qrcode/image/1.png , ...etc.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM