Php generates Chinese garbled QR codes. what should I do? Solution
- $ UrlToEncode = "http://gz.altmi.com ";
- GenerateQRfromGoogle ($ urlToEncode );
- Function generateQRfromGoogle ($ chlorophyll, $ widhtHeight = '000000', $ EC_level = 'l', $ margin = '0 ')
- {
- $ Url = urlencode ($ url );
- Echo '';
- }
2. php QR Code address: Ghost:
- # Create a QR code file
- QRcode: png ('code data text', 'filename.png ');
- # Generating images to the browser
- QRcode: png ('Some othertext 1234 ');
3. libqrencode address: Submit/ 4. QRcode Perl CGI & php Tutorial scripts address: scripts. IV. png method in QRimage class of phpqrcode. php added a logo in the middle of the QR code in the 2nd method:
- Public static function png ($ frame, $ filename = false, $ pixelPerPoint = 4, $ outerFrame = 4, $ saveandprint = FALSE, $ mergePic = '')
- {
- $ Image = self: image ($ frame, $ pixelPerPoint, $ outerFrame );
- If ($ mergePic ){
- $ Im = imagecreatefrompng ($ mergePic );
- $ W = imagesx ($ im );
- $ H = imagesy ($ im );
- ImageAlphaBlending ($ image, true );
- ImageAlphaBlending ($ im, true );
- $ Qrw = (imagesx ($ image)-$ w)/2;
- $ Qrh = (imagesy ($ image)-$ h)/2;
- Imagecopy ($ image, $ im, $ qrw, $ qrh, 0, 0, $ w, $ h );
- Imagedestroy ($ im );
- }
- If ($ filename = false ){
- Header ("Content-type: image/png ");
- ImagePng ($ image );
- } Else {
- ImagePng ($ image, $ filename );
- If ($ saveandprint === TRUE ){
- Header ("Content-type: image/png ");
- ImagePng ($ image );
- }
- }
- ImageDestroy ($ image );
- }
|