Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/284.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 我能';我不会将条形码图像保存到文件夹中,我只是在保存信息后一直看到这个黑屏_Php_Image_Barcode - Fatal编程技术网

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)中指定最后一个参数

我的坏,我不想在屏幕上输出条形码图像,保存信息后,它会创建图像并保存在条形码文件夹中。嗨,嗯,我已经成功地将创建的条形码图像保存在文件夹中,这是我的目标,但黑屏仍然存在,就像坏掉的条形码图像一样,我只想删除这个黑屏图像,这样我就不会每次保存信息时都刷新页面,