【发布时间】:2021-12-04 17:59:19
【问题描述】:
所以我有这个 PHP 代码可以在 WordPress 中生成 QR 码,但是一些税务角色要求代码使用 base64,所以我想让我的代码使用 Hexadecimal Encode 64 和 utf8 有什么帮助吗? 我的代码
<?php
$barcodetype = (get_option('plugindistrict_orderbarcodes_barcodetype') == '' ? 'qrcode' : get_option('plugindistrict_orderbarcodes_barcodetype'));
?>
<div class="pd_order_barcode_div" style="text-align: right; margin: 40px; ">
<img class="pd_order_barcode" style="margin-top: -155; margin-right: 50; width:20% " src="https://2tfh7u96zl.execute-api.us-east-1.amazonaws.com/added-jest-tests/barcode?type=<?php echo $barcodetype.'&value='.(($barcodetype == 'qrcode') ? $checkinpath .'Name:Sleep Blue'.'%0A'.'Tax No:302188012300003'.'%0A'.'Bill NO:'.$this->get_formatted_number().'%0A'.'Date-Time:'.$this->get_formatted_date().'%0A'.'Bill Amt With Vat:'.$order->get_total().'%0A'.'Vat Amt:'.$order->get_total_tax(): $order).'&includeText='.(get_option('plugindistrict_orderbarcodes_showtextupc') == 1 ? 'true' : 'false'); ?>" />
``
【问题讨论】:
-
您尝试过什么让它发挥作用?究竟是什么没有按预期工作?
-
我想让代码用base64生成二维码,PHP代码没有问题只是想添加一些行使其生成base64
-
请通过编辑为您的问题添加所有说明。如果一切正常,您的问题是什么?
-
请提供足够的代码,以便其他人更好地理解或重现问题。