无法将数据发送到FPDF

时间:2016-09-11 07:35:04

标签: html mysql reference fpdf

我有一个名为 page2.php 的php页面,它通过 conectionDB.php uploadChannel1.php 连接到数据库以上传图像。我有html页面 channel1.html 我的表单在哪里。

但是我需要将输入发送到FPDF来打印或保存它,但是这个错误一直显示

  

致命错误:未捕获异常'异常',消息'FPDF错误:某些数据已输出,无法发送PDF文件'

我使用 ob_start ob_flush ob_clean 和其他人但仍然无法正常工作我知道问题出在我的PHP代码上。请伙计们帮助我。

require 'connectionDB.php';
require 'channel1.html';
require 'uploadChannel1.php';

 if(isset($_POST['stdName']) && isset($_POST['secondGrand'])&& isset($_POST['grandName']) && isset($_POST['fatherAName']) && isset($_POST['motherGrand']) && isset($_POST['motherFatherName']) && isset($_POST['motherName']) && isset($_POST['subjectNum']) && isset($_POST['TotalNum'])&& isset($_POST['Avg']) && isset($_POST['birthDate']) && isset($_POST['gender']) && isset($_POST['stdType'])&& isset($_POST['jobs']) && isset($_POST['city'])&& isset($_POST['phone'])&& isset($_POST['bookDate'])&& isset($_POST['bookNo']))
 {
    $student=sanitizeString($_POST['stdName']);
    $grand2=sanitizeString($_POST['secondGrand']); 
    $grand1=sanitizeString($_POST['grandName']);
    $father=sanitizeString($_POST['fatherAName']);  
     $motherGrand=sanitizeString($_POST['motherGrand']);
     $motherFather=sanitizeString($_POST['motherFatherName']); 
     $mother=sanitizeString($_POST['motherName']); 
     $subNo= sanitizeString($_POST['subjectNum']);
     $Total=sanitizeString($_POST['TotalNum']);
     $avg=sanitizeString($_POST['Avg']);
     $graduateDate=sanitizeString($_POST['graduateYear']);
     $birth=sanitizeString($_POST['birthDate']);
     $gender=sanitizeString($_POST['gender']);
     $job=sanitizeString($_POST['jobs']);
     $stdType=sanitizeString($_POST['stdType']);
     $City=sanitizeString($_POST['city']);
     $tel=sanitizeString($_POST['phone']);
     $bookdate=sanitizeString($_POST['bookDate']);
     $bookNum=sanitizeString($_POST['bookNo']);

     if(!empty($student) &&!empty($grand2) &&!empty($grand1) &&!empty($father)&&!empty($motherGrand)&&!empty($motherFather)&&!empty($mother)&&!empty($subNo)&&!empty($Total)&&!empty($avg)&&!empty($graduateDate)&&!empty($birth)&&!empty($gender)&&!empty($stdType)&&!empty($City)&&!empty($tel) && !empty($bookdate) &&!empty($bookNum) &&!empty($job))
     {
         session_start();
         $_SESSION['stdName] =$studen ;
         }
.......

0 个答案:

没有答案