http://sourceforge.net/projects/phpqrcode/ , 是一个很棒的库,但我找不到如何将 png 图像作为字符串返回,基本示例是
QRcode::png('code data text', 'filename.png'); // creates file
QRcode::png('some othertext 1234'); // creates code image and outputs it directly into browser
我检查了文档,什么也没有,帮助! :B
最佳答案
ob_start();
QRCode::png('text', null);
$imageString = base64_encode( ob_get_contents() );
ob_end_clean();
关于phpqrcode 库以字符串形式返回图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11352334/