|  |  | 
          
            | Error: AFM file not found: cp874 
 การเพิ่ม font thai แล้วขึ้น error แบบ นี้คะ  จะเเก้ตรงใหนคะ
 
 code
 
 Code (PHP)
 
 <? ob_start(); ?>
<html>
<head>
</head>
<body>
<?php
require('fpdf.php');
session_start();
class PDF extends FPDF
{
	function Header(){
			
	}
function BasicTable($header,$data)
{
	//Header
	$w=array(30,30,30,25,20,20,20,20,20);
	//Header
	
	for($i=0;$i<count($header);$i++)
		$this->Cell($w[$i],7,$header[$i],1,0,'C');
	$this->Ln();
	//Data
	foreach ($data as $eachResult) 
	{
		
		$this->Cell(30,6,$eachResult["student_ID"],1);
		$this->Cell(30,6,$eachResult["Name"],1);
		$this->Cell(30,6,$eachResult["Last_name"],1);
		$this->Cell(25,6,$eachResult["major"],1);
		$this->Cell(20,6,$eachResult["system"],1);
		$this->Cell(20,6,$eachResult["plan"],1);
		$this->Cell(20,6,$eachResult["teacher_ID"],1);
		$this->Cell(20,6,$eachResult["TS"],1);
	
		$this->Ln();
	}
}
		
}
$pdf=new PDF();
//Column titles
$header=array('student_ID','Name','Last_name','major','system','plan','teacher_ID','TS');
//Data loading
//*** Load MySQL Data ***//
$objConnect = mysql_connect("localhost","root","123456") or die("Error Connect to Database");
$objDB = mysql_select_db("project_se_sa");
$strSQL = "SELECT * FROM student";
$objQuery = mysql_query($strSQL);
$resultData = array();
for ($i=0;$i<mysql_num_rows($objQuery);$i++) {
	$result = mysql_fetch_array($objQuery);
	array_push($resultData,$result);
}
//************************//
$pdf->SetFont('Arial','',10);
//*** Table 1 ***//
$pdf->AddPage();
$pdf->Cell(0,0,'DATA STUDENT','center');
$pdf->Ln(15);
$pdf->Ln(35);
$pdf->BasicTable($header,$resultData);
$pdf->Output("MyPDF/MyPDF1.pdf","F");
?>
PDF Created Click <a href="MyPDF/MyPDF1.pdf">here</a> to Download
</body>
</html>
 
 
 
  
 
 มีไฟล์ cp874 แต่ก็ ยัง  error
 
 
 
 Tag : PHP
 
 
 |  
            |  |  
            | 
              
                |  |  |  |  
                |  | 
                    
                      | Date :
                          2014-11-03 01:14:53 | By :
                          supattra_BEER | View :
                          1958 | Reply :
                          4 |  |  |  
                |  |  |  |  |  
            |  |  
		            |  |