Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > PHP > PHP Forum > หน้าเว็บขึ้น Parse error: syntax error, unexpected end of file in C:\AppServ\www\splitterdb\testpdf.php on line 75 แก้ไขยังไงค่ะ



 

หน้าเว็บขึ้น Parse error: syntax error, unexpected end of file in C:\AppServ\www\splitterdb\testpdf.php on line 75 แก้ไขยังไงค่ะ

 



Topic : 124461



โพสกระทู้ ( 0 )
บทความ ( 0 )



สถานะออฟไลน์




Code (PHP)
<?php
require("fpdf/fpdf.php");
class PDF extends FPDF
{
	function Header(){
		//$this->SetY( -10 );
		//$this->SetFont('Arial','I',5);
// $this->Cell(0,10,'Time '. date('d').'/'. date('m').'/'.(  date('Y')+543 ).' '. date('H:i:s') ,0,0,'R');
	}
}


define("FPDF_FONTPATH","font/");
$pdf=new FPDF( 'L' , 'mm' , 'A4' );
$pdf->SetMargins( 30,30,30 );
$pdf->AddPage();
$pdf->Image('fpdf/cat.jpg',135,12,30,0,'','');
$pdf->AddFont('angsa','','angsa.php');
$pdf->SetFont('angsa','',20);
$pdf->Cell(0,20,iconv( 'UTF-8','TIS-620','รายงานการใช้งานอุปกรณ์ PE ()'),0,1,"C");
//$pdf->Ln();
$pdf->Cell(0,1,iconv( 'UTF-8','TIS-620','สำนักงานบริการลูกค้า กสท เขตกลาง'),0,1,"C");

$pdf->SetFontSize(10);
$html = "
	<table  border= 1>
	<tr>
		<th width=90>Region</th>
		<th width=90>Brand</th>
		<th width=120>Model </th>
		<th width=97>SiteName</th>
		<th width=95>HostName </th>
		<th width=91>IP</th>
		<th width=150>Typesite</th>
		<th width=91>Locality</th>
		<th width=91>District</th>
		<th width=91>Province</th>
		<th width=91>Lat</th>
		<th width=91>Long</th>
		<th width=91>Recorder</th>
		<th width=91>Edit Day</th>
	</tr> ";
@mysql_connect("localhost","root","product1000 ") or die(mysql_error());
mysql_select_db("splitterdb") or die(mysql_error());

$sqlMain = "SELECT pe.pe_id,pe.region,pe.brand_id,b.bname,pe.model_id,m.mname,pe.sitename,pe.hostname,pe.ip,
					pe.ts_id,ts.tsname,pe.locality,pe.dist_id,d.dname,pe.province,pe.latitude,pe.longitude,pe.username,pe.editday  
					FROM pe INNER JOIN (brand b,model m,typesite ts,district d) 
					ON (pe.brand_id=b.brand_id AND pe.model_id=m.model_id AND pe.ts_id=ts.ts_id AND pe.dist_id=d.dist_id) 
					WHERE pe.region='".$_SESSION["viewregion"]."' 
					ORDER BY pe.province,d.dname,pe.model_id";
	$qryMain = mysqli_query($conn,$sqlMain);
	$resMain = mysqli_fetch_array($qryMain);

while($sql = mysqli_fetch_array($resMain)) {
	$html .= "<tr>
		<td width=90>{$sql['region']}</td>
		<td width=90>{$sql['brand_id']}</td>	
		<td width=120>{$sql['model_id']}</td>	
		<td width=97>{$sql['sitename']}</td>
		<td width=95>{$sql['hostname']}</td>
		<td width=91>{$sql['ip']}</td>
		<td width=150>{$sql['tsname']}</td>
		<td width=91>{$sql['locality']}</td>
		<td width=91>{$sql['dname']}</td>
		<td width=91>{$sql['province']}</td>
		<td width=91>{$sql['latitude']}</td>
		<td width=91>{$sql['longitude']}</td>
		<td width=91>{$sql['username']}</td>
		<td width=91>{$sql['editday']}</td>
		<tr> }
		</table>" ;
		$pdf->WriteHTML($html);
$pdf->Output($html);
?>




Tag : PHP, MySQL, Web (ASP.NET)







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2016-09-02 15:15:50 By : jame275 View : 2551 Reply : 4
 

 

No. 1



โพสกระทู้ ( 411 )
บทความ ( 0 )



สถานะออฟไลน์


syntax error แปลว่า เขียนผิดรูปแบบ
และ error บอกว่าบรรทัด 75 ลองหาดู ที่บรรทัดนั้น เขียนอะไรผิดสักอย่าง ดูตั้งแต่ 74,75,76 เลย






แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2016-09-02 16:13:04 By : goragod
 


 

No. 2



โพสกระทู้ ( 51 )
บทความ ( 0 )



สถานะออฟไลน์
Facebook

Code (PHP)
while($sql = mysqli_fetch_array($resMain)) {
$html .= "<tr>
<td width=90>{$sql['region']}</td>
<td width=90>{$sql['brand_id']}</td>	
<td width=120>{$sql['model_id']}</td>	
<td width=97>{$sql['sitename']}</td>
<td width=95>{$sql['hostname']}</td>
<td width=91>{$sql['ip']}</td>
<td width=150>{$sql['tsname']}</td>
<td width=91>{$sql['locality']}</td>
<td width=91>{$sql['dname']}</td>
<td width=91>{$sql['province']}</td>
<td width=91>{$sql['latitude']}</td>
<td width=91>{$sql['longitude']}</td>
<td width=91>{$sql['username']}</td>
<td width=91>{$sql['editday']}</td>
<tr> ";
 } 
 "</table>" ;

แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2016-09-02 16:23:09 By : kimhuncodec
 

 

No. 3

Guest


ผิดเพราะเอา } ไปไว้ใน " หลัง </tr>

แก้เป็น

Code (PHP)
<?php
require("fpdf/fpdf.php");
class PDF extends FPDF
{
function Header(){
//$this->SetY( -10 );
//$this->SetFont('Arial','I',5);
// $this->Cell(0,10,'Time '. date('d').'/'. date('m').'/'.( date('Y')+543 ).' '. date('H:i:s') ,0,0,'R');
}
}


define("FPDF_FONTPATH","font/");
$pdf=new FPDF( 'L' , 'mm' , 'A4' );
$pdf->SetMargins( 30,30,30 );
$pdf->AddPage();
$pdf->Image('fpdf/cat.jpg',135,12,30,0,'','');
$pdf->AddFont('angsa','','angsa.php');
$pdf->SetFont('angsa','',20);
$pdf->Cell(0,20,iconv( 'UTF-8','TIS-620','รายงานการใช้งานอุปกรณ์ PE ()'),0,1,"C");
//$pdf->Ln();
$pdf->Cell(0,1,iconv( 'UTF-8','TIS-620','สำนักงานบริการลูกค้า กสท เขตกลาง'),0,1,"C");

$pdf->SetFontSize(10);
$html = "
<table border= 1>
<tr>
<th width=90>Region</th>
<th width=90>Brand</th>
<th width=120>Model </th>
<th width=97>SiteName</th>
<th width=95>HostName </th>
<th width=91>IP</th>
<th width=150>Typesite</th>
<th width=91>Locality</th>
<th width=91>District</th>
<th width=91>Province</th>
<th width=91>Lat</th>
<th width=91>Long</th>
<th width=91>Recorder</th>
<th width=91>Edit Day</th>
</tr> ";
@mysql_connect("localhost","root","product1000 ") or die(mysql_error());
mysql_select_db("splitterdb") or die(mysql_error());

$sqlMain = "SELECT pe.pe_id,pe.region,pe.brand_id,b.bname,pe.model_id,m.mname,pe.sitename,pe.hostname,pe.ip,
pe.ts_id,ts.tsname,pe.locality,pe.dist_id,d.dname,pe.province,pe.latitude,pe.longitude,pe.username,pe.editday 
FROM pe INNER JOIN (brand b,model m,typesite ts,district d) 
ON (pe.brand_id=b.brand_id AND pe.model_id=m.model_id AND pe.ts_id=ts.ts_id AND pe.dist_id=d.dist_id) 
WHERE pe.region='".$_SESSION["viewregion"]."' 
ORDER BY pe.province,d.dname,pe.model_id";
$qryMain = mysqli_query($conn,$sqlMain);
$resMain = mysqli_fetch_array($qryMain);

while($sql = mysqli_fetch_array($resMain)) {
$html .= "<tr>
<td width=90>{$sql['region']}</td>
<td width=90>{$sql['brand_id']}</td>	
<td width=120>{$sql['model_id']}</td>	
<td width=97>{$sql['sitename']}</td>
<td width=95>{$sql['hostname']}</td>
<td width=91>{$sql['ip']}</td>
<td width=150>{$sql['tsname']}</td>
<td width=91>{$sql['locality']}</td>
<td width=91>{$sql['dname']}</td>
<td width=91>{$sql['province']}</td>
<td width=91>{$sql['latitude']}</td>
<td width=91>{$sql['longitude']}</td>
<td width=91>{$sql['username']}</td>
<td width=91>{$sql['editday']}</td>
<tr>";
 }
$html . = "</table>" ;
$pdf->WriteHTML($html);
$pdf->Output($html);
?>

แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2016-09-02 16:28:20 By : (- - ')
 


 

No. 4

Guest


เอาใหม่ ต้องเป็น </tr>

Code (PHP)
<?php
require("fpdf/fpdf.php");
class PDF extends FPDF
{
function Header(){
//$this->SetY( -10 );
//$this->SetFont('Arial','I',5);
// $this->Cell(0,10,'Time '. date('d').'/'. date('m').'/'.( date('Y')+543 ).' '. date('H:i:s') ,0,0,'R');
}
}


define("FPDF_FONTPATH","font/");
$pdf=new FPDF( 'L' , 'mm' , 'A4' );
$pdf->SetMargins( 30,30,30 );
$pdf->AddPage();
$pdf->Image('fpdf/cat.jpg',135,12,30,0,'','');
$pdf->AddFont('angsa','','angsa.php');
$pdf->SetFont('angsa','',20);
$pdf->Cell(0,20,iconv( 'UTF-8','TIS-620','รายงานการใช้งานอุปกรณ์ PE ()'),0,1,"C");
//$pdf->Ln();
$pdf->Cell(0,1,iconv( 'UTF-8','TIS-620','สำนักงานบริการลูกค้า กสท เขตกลาง'),0,1,"C");

$pdf->SetFontSize(10);
$html = "
<table border= 1>
<tr>
<th width=90>Region</th>
<th width=90>Brand</th>
<th width=120>Model </th>
<th width=97>SiteName</th>
<th width=95>HostName </th>
<th width=91>IP</th>
<th width=150>Typesite</th>
<th width=91>Locality</th>
<th width=91>District</th>
<th width=91>Province</th>
<th width=91>Lat</th>
<th width=91>Long</th>
<th width=91>Recorder</th>
<th width=91>Edit Day</th>
</tr> ";
@mysql_connect("localhost","root","product1000 ") or die(mysql_error());
mysql_select_db("splitterdb") or die(mysql_error());

$sqlMain = "SELECT pe.pe_id,pe.region,pe.brand_id,b.bname,pe.model_id,m.mname,pe.sitename,pe.hostname,pe.ip,
pe.ts_id,ts.tsname,pe.locality,pe.dist_id,d.dname,pe.province,pe.latitude,pe.longitude,pe.username,pe.editday 
FROM pe INNER JOIN (brand b,model m,typesite ts,district d) 
ON (pe.brand_id=b.brand_id AND pe.model_id=m.model_id AND pe.ts_id=ts.ts_id AND pe.dist_id=d.dist_id) 
WHERE pe.region='".$_SESSION["viewregion"]."' 
ORDER BY pe.province,d.dname,pe.model_id";
$qryMain = mysqli_query($conn,$sqlMain);
$resMain = mysqli_fetch_array($qryMain);

while($sql = mysqli_fetch_array($resMain)) {
$html .= "<tr>
<td width=90>{$sql['region']}</td>
<td width=90>{$sql['brand_id']}</td>	
<td width=120>{$sql['model_id']}</td>	
<td width=97>{$sql['sitename']}</td>
<td width=95>{$sql['hostname']}</td>
<td width=91>{$sql['ip']}</td>
<td width=150>{$sql['tsname']}</td>
<td width=91>{$sql['locality']}</td>
<td width=91>{$sql['dname']}</td>
<td width=91>{$sql['province']}</td>
<td width=91>{$sql['latitude']}</td>
<td width=91>{$sql['longitude']}</td>
<td width=91>{$sql['username']}</td>
<td width=91>{$sql['editday']}</td>
</tr>";
 }
$html . = "</table>" ;
$pdf->WriteHTML($html);
$pdf->Output($html);
?>


แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2016-09-02 16:29:44 By : (- - ')
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : หน้าเว็บขึ้น Parse error: syntax error, unexpected end of file in C:\AppServ\www\splitterdb\testpdf.php on line 75 แก้ไขยังไงค่ะ
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 04
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่