Home > Article > Backend Development > How to solve the php qrcode garbled problem
The solution to garbled php qrcode: first add "exit();" after calling "\QRcode::png($url);"; then call "\QRcode::png($url) );" just add "'Content-Type: image/png'" in front of it.
Recommendation: "PHP Tutorial"
phpqrcode garbled code/phpqrcode picture is not displayed
The error is as shown, garbled characters
##After calling \QRcode::png($url); add exit(); Before calling \QRcode::png($url); addheader('Content-Type: image/png'); ob_clean();complete code:
The above is the detailed content of How to solve the php qrcode garbled problem. For more information, please follow other related articles on the PHP Chinese website!