Php 在新页面中打开pdf报告
下面给出了一个php scriptreport.php,它在单击按钮时生成pdf报告!不幸的是pdf在同一页上打开,我想在新页上打开pdf!我怎样才能做到这一点Php 在新页面中打开pdf报告,php,pdf,tabs,dynamically-generated,Php,Pdf,Tabs,Dynamically Generated,下面给出了一个php scriptreport.php,它在单击按钮时生成pdf报告!不幸的是pdf在同一页上打开,我想在新页上打开pdf!我怎样才能做到这一点 <?php require_once("includes/db.php"); // provides db connection require("fpdf/fpdf.php"); } $sql="SELECT count(Email) as Number, Date from reportorder"; $result=m
<?php
require_once("includes/db.php"); // provides db connection
require("fpdf/fpdf.php");
}
$sql="SELECT count(Email) as Number, Date from reportorder";
$result=mysqli_query($db,$sql);
$pdf=new PDF();
$pdf->AddPage();
$pdf->AliasNbPages();
$pdf->SetFont('Arial','B',12);
$pdf->Cell(90,10,'Date',1,0,'C',0);
$pdf->Cell(90,10,'Number of orders',1,1,'C',0);
while($row=mysqli_fetch_array($result))
{
// cell with left and right borders
$pdf->Cell(90,10,$row['Date'],1,0,'C',0); // 1,0
$pdf->Cell(90,10,$row['Number'] ,1,1,'C',0);
}
$pdf->output();
?>
按钮部分位于加载到iframe中的页面中
<a href='report.php'>
<input class='button1' type='button' value='View report' >
</a>
需要在target=\u为空的情况下添加此target属性吗?它不起作用,因为包含按钮的页面位于iframe内
<a href='report.php' target="_blank">