【问题标题】:Is there any barcode generator extension for Yii framework 2.0?Yii 框架 2.0 有条码生成器扩展吗?
【发布时间】:2015-11-16 02:50:14
【问题描述】:

使用 Yii 框架 2.0 我想生成一个条形码列表。我试图在 Internet 上找到 Yii 框架 2.0 的条形码生成器扩展,但没有运气。我确实只找到了 Yii 1 的条形码生成器扩展。

有没有人知道 Yii 2.0 的任何好的条形码生成器扩展以及良好的文档?

【问题讨论】:

  • 你为 Yii1 找到的那个是什么?也许可以移植。
  • 您访问此链接以获得答案....http://www.yiiframework.com/extension/yii2-barcode-generator-8-types/

标签: php yii2 barcode


【解决方案1】:

您访问此链接以获得答案....http://www.yiiframework.com/extension/yii2-barcode-generator-8-types/‌​

<html><div id="showBarcode"></div></html> <!--This element id should  be passed on to options-->
use barcode\barcode\BarcodeGenerator as BarcodeGenerator;

$optionsArray = array(
'elementId'=> 'showBarcode', /* div or canvas id*/
'value'=> '4797001018719', /* value for EAN 13 be careful to set right values for each barcode type */
'type'=>'ean13',/*supported types  ean8, ean13, upc, std25, int25, code11, code39, code93, code128, codabar, msi, datamatrix*/

);
echo BarcodeGenerator::widget($optionsArray);

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-10-22
    • 2012-11-02
    • 2012-03-22
    • 1970-01-01
    • 2012-05-11
    相关资源
    最近更新 更多