function AA(){
// Including all required classes
require_once(\'class/BCGFontFile.php\');
require_once(\'class/BCGColor.php\');
require_once(\'class/BCGDrawing.php\');
// Including the barcode technology
require_once(\'class/BCGcode39.barcode.php\');
// Loading Font
$font = new BCGFontFile(\'./class/font/Arial.ttf\', 18);
// The arguments are R, G, B for color.
$color_black = new BCGColor(0, 0, 0);
$color_white = new BCGColor(255, 255, 255);
$drawException = null;
try {
$code = new BCGcode39();
$code->setScale(2); // Resolution
$code->setThickness(30); // Thickness
$code->setForegroundColor($color_black); // Color of bars
$code->setBackgroundColor($color_white); // Color of spaces
$code->setFont($font); // Font (or 0)
$code->parse(\'jebal\'); // Text
} catch(Exception $exception) {
$drawException = $exception;
}
$drawing = new BCGDrawing(\'\', $color_white);
if($drawException) {
$drawing->drawException($drawException);
} else {
$drawing->setBarcode($code);
$drawing->draw();
}
$drawing->finish(BCGDrawing::IMG_FORMAT_PNG);
}
함수A를 한번만 실행하면 문제없이 이미지처럼 잘나오지만...
두번이상 실행을 하게 되면(한번에 두개이상의 바코드사진을 보기위해) 이상하게 아무것도 나오지가 않네요 ㅜㅜ
왜그런가요 ㅜㅜ제생각엔 이미지를 생성하는거라...마지막 finish에서 문제가생기는거같은데..
어떻게 해경해야 하나요 ㅜㅜ
댓글 0