【问题标题】:Generating QR code of an URL生成 URL 的二维码
【发布时间】:2014-11-21 13:43:27
【问题描述】:

我已经使用谷歌图表和 LGPL QR 码类为 php 生成 URL 的 QR 码,但都无法为下面的 URL 生成正确的代码:

http://www.xxxxx.com/xxxx/index.php?route=sale/order/invoice&order_id=4&token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

二维码扫描后的结果会是这样的

http://www.xxxxx.com/xxxx/index.php?route=sale/order/invoice&order_id=4&token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

有什么办法可以避免amp;出现?

【问题讨论】:

  • 我不太明白这个问题;问题中的两个网址似乎完全相同?
  • @Codor 格式错误。查看markdown,你会看到一个是&token,另一个是&token
  • 如何扫描二维码?如果来自智能手机,应用程序的名称是什么?另外,你能把二维码链接给我们吗(带有假数据但 URL 结构相同)?
  • 我认为您正在使用 Opencart 的 url 助手来生成 URL?如果是这样,请通读我对这个(看似无关的)问题的回答stackoverflow.com/a/27262139/1301076 我怀疑你有完全相同的问题
  • & 是& 的 HTML 代码 - 考虑一下:stackoverflow.com/questions/3541711/… 您还可以查看我关于在 python 中生成二维码的答案:stackoverflow.com/a/68385427/4575793

标签: opencart


【解决方案1】:

我不确定,它是否对你有帮助。原因是我在理解您的问题时有些困难。
也许这个 javascript 可以帮助您生成 URL,我将它用作书签。

javascript:void(window.open('http://chart.apis.google.com/chart?cht=qr&chs=300x300&chl='+encodeURIComponent(location.href),'Qr code','top=100,left=200,width=350,height=350,status=yes'));

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多