The QR code generated by php displays garbled characters

王林
Release: 2023-02-24 14:18:02
Original
2121 people have browsed it

The QR code generated by php displays garbled characters

Garbled code scenario

The QR code generated by php displays garbled charactersSolution

Execute the one that generates the QR code Just die or exit after the code:

	public function index()
    {
    	Vendor('phpqrcode.phpqrcode');
    	$url="https://www.wangchuangcode.cn";
    	$errorCorrectionLevel =intval(2) ;//容错级别 
      	$matrixPointSize = intval(4);//生成图片大小 
     	//生成二维码图片 
      	$object = new \QRcode();
      	$object->png($url, false, $errorCorrectionLevel, $matrixPointSize, 2); 
      	die;
    }
Copy after login

The QR code generated by php displays garbled characters

Recommended tutorial: PHP video tutorial

The above is the detailed content of The QR code generated by php displays garbled characters. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!