【发布时间】:2020-06-10 12:19:08
【问题描述】:
大家好,stackoverflow 中的每一个人。我今天整天都在努力解决这个问题。正如您在下面的图像中看到的,二维码不在列中。这发生在最后一行的所有页面上。我还将附上我的代码。请检查我的代码是否有问题。计数器将显示一行三列相同的数据。
<?php
include('../Connection/connection.php');
require('../FPDF/fpdf.php');
$QueryCustomer = "SELECT cus_name, cus_qr FROM tbl_customer WHERE cus_status = 1 AND cus_type = 1";
$ResultQueryCustomer = mysqli_query($con,$QueryCustomer);
$RowQueryCustomer = mysqli_num_rows($ResultQueryCustomer);
$QueryWebConfig = "SELECT * FROM tbl_web_config";
$ResultQueryWebConfig = mysqli_query($con,$QueryWebConfig);
$RowQueryWebConfig = mysqli_num_rows($ResultQueryWebConfig);
$ResQueryWebConfig = mysqli_fetch_array($ResultQueryWebConfig);
$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial','',8);
$counter = 0;
while($ResQueryCustomer = mysqli_fetch_array($ResultQueryCustomer)){
$pdf->Image("../CustomerQr/".$ResQueryCustomer['cus_qr'].".png", $pdf->GetX(), $pdf->GetY(), 40);
$pdf->Cell( 65, 80,$ResQueryCustomer['cus_name'],1);
$counter++;
if($counter % 3 == 0)
{
$pdf->Ln();
}
}
$pdf->Output();
?>
【问题讨论】: