Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/240.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 在新页面中打开pdf报告_Php_Pdf_Tabs_Dynamically Generated - Fatal编程技术网

Php 在新页面中打开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 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=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">