Php yii2中的条形码未显示
这几天我一直在使用Php yii2中的条形码未显示,php,yii2,barcode,Php,Yii2,Barcode,这几天我一直在使用yii2advance模板,我似乎无法使用我安装的条形码模块。我希望条形码显示在我的一个函数的view.php中,但它没有显示出来 这是我的view.php源代码 <?= DetailView::widget([ 'model' => $model, 'attributes' => [ 'id', 'WeatherStation_Model', 'WeatherStation_Name',
yii2
advance模板,我似乎无法使用我安装的条形码模块。我希望条形码显示在我的一个函数的view.php中,但它没有显示出来
这是我的view.php源代码
<?= DetailView::widget([
'model' => $model,
'attributes' => [
'id',
'WeatherStation_Model',
'WeatherStation_Name',
'WeatherStation_Location',
'WeatherStation_Status',
'WeatherStation_Gateway',
'WeatherStation_Logger',
'WeatherStation_Number',
[
'attribute' => 'barcode_no',
'format' => 'raw',
'filter' => BarcodeGenerator::widget([
'elementId' => 'barcode-'.$model->barcode_no,
'value' => $model->barcode_no,
'type' => 'code128',
'rectangular' => true,
'settings' => [
'output' => 'canvas',
],
]),
],
],
]) ?>
这是我尝试执行view命令时得到的结果
您可以更改图像格式:
'format' => 'image',
并检查结果。您可以更改图像格式:
'format' => 'image',
并检查结果。已尝试,但仍然没有条形码图像。它的值不是空的,而是没有条形码的图像。现在没有一个值为空,这是哪个条形码生成器小部件?这是哪个条形码生成器小部件?