Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to customize how to generate QR Code Jump address by PHP

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

PHP how to customize how to generate QR code jump address, I believe that many inexperienced people do not know what to do, so this paper summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.

A relatively simple PHP custom generated QR code jump address, mobile Wechat scan code, automatically jump to the defined link. Support custom generation of QR code size, spacing, etc.

Mouse hover displays the QR code pop-up layer and disappears after leaving. The js implementation is as follows:

$(function () {$("# btn_store") .hover (function () {var left = $(this). Offset (). Left; var top = $(this). Offset (). Top; var id = $(this) .attr ("data-id") $("# qrcode_box") .css ({"left": left, "top": top + 31}) .show ()}, function () {$("# qrcode_box") .fadeOut ();})

Generate a QR code:

Include_once 'phpqrcode.php'; $data = isset ($_ GET [' url'])? $_ GET ['url']: "http://www.sucaihuo.com"; / / error correction level: l, M, Q, H $level =' level; / / size: 1 to 10, for mobile terminal 4, $size = 7 / / the following notes the code to save the QR code picture locally. If you want to save the picture, replace the second parameter false / / $path = "images/" with $fileName; / / the generated file name / / $fileName = $path.$size.'.png'; $margin = 0strap / spacing QRcode::png ($data, false, $level, $size,$margin); after reading the above, have you mastered how PHP customizes the method of generating QR code jump address? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 246

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report