我正在使用以下代码使用barcodephp此脚本
在php中生成条形码<?php
require('class/BCGFontFile.php');
require('class/BCGColor.php');
require('class/BCGDrawing.php');
require('class/BCGean13.barcode.php');
$font = new BCGFontFile('fontArial.ttf', 18);
$color_black = new BCGColor(0, 0, 0);
$color_white = new BCGColor(255, 255, 255);
// Barcode Part
$code = new BCGean13();
$code->setScale(2);
$code->setThickness(30);
$code->setForegroundColor($color_black);
$code->setBackgroundColor($color_white);
$code->setFont($font);
$code->parse('578124871412');
// Drawing Part
$drawing = new BCGDrawing('', $color_white);
$drawing->setBarcode($code);
$drawing->draw();
header('Content-Type: image/png');
$drawing->finish(BCGDrawing::IMG_FORMAT_PNG);
?>
我收到以下错误,我检查了库的位置,一切都很好
问题是什么?
答案 0 :(得分:1)
好的,我找到了解决方案,只需删除
require('class/BCGFontFile.php');