Php 我能';我不会将条形码图像保存到文件夹中,我只是在保存信息后一直看到这个黑屏
这是条形码生成随机条形码的代码Php 我能';我不会将条形码图像保存到文件夹中,我只是在保存信息后一直看到这个黑屏,php,image,barcode,Php,Image,Barcode,这是条形码生成随机条形码的代码 $barcode = substr(number_format(time() * rand(),0,'',''),0,13); $barcodeimg = $barcode.".png"; $stud->generateBarcodeImage($barcode,20,"horizontal","code128",""); 我不明白这个代码,我想研究一下,但我想不出来 // Draw barcode to the screen
$barcode = substr(number_format(time() * rand(),0,'',''),0,13);
$barcodeimg = $barcode.".png";
$stud->generateBarcodeImage($barcode,20,"horizontal","code128","");
我不明白这个代码,我想研究一下,但我想不出来
// Draw barcode to the screen
header('Content-type: image/png');
imagepng($image, "barcode/".$text.".png");
imagedestroy($image);
假设图像数据正确保存在
$image
中。如果要将图像输出到屏幕,请不要在imagepng($image)中指定最后一个参数代码>我的坏,我不想在屏幕上输出条形码图像,保存信息后,它会创建图像并保存在条形码文件夹中。嗨,嗯,我已经成功地将创建的条形码图像保存在文件夹中,这是我的目标,但黑屏仍然存在,就像坏掉的条形码图像一样,我只想删除这个黑屏图像,这样我就不会每次保存信息时都刷新页面,