คือผมจะโชว์หน้าเวบบอร์ดหน้า แรกแต่ ไฟล์หน้าแรกมันดันเป็นนามสกุล *.tpl
โค้ดเดิม ในไฟล์ www.authgw.login.form.tpl
<html>
<head>
<title>Redirect to Login Page </title>
<meta http-equiv="Content-Type" content="text/html; charset=tis-620">
<link href="css/style.css" rel="stylesheet" type="text/css">
</head>
<body background="images/bg.gif" bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table id="Table_01" border="0" width="780" cellpadding="0" cellspacing="0" align="center">
<tr>
<td colspan=3> </td>
</tr>
<tr>
<td width="15%"><img src="images/img_05.gif" width="22" height="21" alt=""></td>
<td background="images/img_06.gif" width="82%"><img src="images/img_06.gif" width="25" height="21" alt=""></td>
<td width="3%"><img src="images/img_08.gif" width="20" height="21" alt=""></td>
</tr>
<tr valign="top">
<td background="images/img_13.gif" width="15%" height="485"><img src="images/img_10.gif" width="22" height="366" alt=""></td>
<td width="82%" bgcolor="white" height="485">
<META HTTP-EQUIV="Cache-Control" content="no-cache">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<div align="center">
<div>{$message}</div>
<FORM method="POST" action="{$action}{$popup}">
<p align="left"><img src="login-images/banner_logo.jpg" width="930" height="268"><br>
<br>
.<font color="#FFFFFF"> ........</font><font face="MS Sans Serif" color="#0000FF"><b><font color="#330000">Entertain
<font color="#FFFFFF">.</font>Servics</font></b></font><font face="MS Sans Serif" color="#FFFFFF">.</font><font color="#FFFFFF">.............................................</font><font face="MS Sans Serif">Username:
</font>
<INPUT type="text" name="txt_username" size="25" maxlength="50" tabindex="1">
<br>
<font color="#FFFFFF">.............<font face="MS Sans Serif">..</font></font><font face="MS Sans Serif" color="#CC9966">
</font><font face="MS Sans Serif"><font color="#CC9966"><a href="movics.html" target="_blank">Movics
piecture</a></font><font color="#FFFFFF">. .</font></font><font color="#FFFFFF">.....................................
.... ...</font><font face="MS Sans Serif">Password:</font>
<INPUT type="password" name="txt_password" size="25" maxlength="50" tabindex="2">
<br>
.<font color="#FFFFFF">.............. </font><font color="#CC9966" face="MS Sans Serif"><a href="music.html" target="_blank">Music</a>.</font><font color="#FFFFFF" face="MS Sans Serif">..</font><font color="#FFFFFF">.......................................................................................</font>
<INPUT type="submit" name="sm_login" value="Login" tabindex="3">
<input name="uri_host" value="{$uri_host}" type="hidden">
<input name="uri_path" value="{$uri_path}" type="hidden">
<br>
<font color="#FFFFFF">...............<font face="MS Sans Serif" color="#000000">
</font></font><font color="#CC9966" face="MS Sans Serif"><a href="software.html" target="_blank">Software</a></font><font color="#FFFFFF">....
....................................................................</font><br>
<font color="#FFFFFF">...............</font><font face="MS Sans Serif" color="#CC9966">
</font><font face="MS Sans Serif"><font color="#CC9966"><a href="games.html" target="_blank">Games</a></font>
</font><br>
.<font color="#FFFFFF">.................................................................................</font><a href="../webboard/webboard.php?Category=mos_wifi"><font face="MS Sans Serif">บอร์ดแจ้งปัญหาการใช้งาน
และแสดงความคิดเห็นต่าง ๆ </font> </a> </p>
</FORM>
</div>
</td>
<td background="images/img_14.gif" width="3%" height="485"><img src="images/img_12.gif" width="20" height="369" alt=""></td>
</tr>
<tr>
<td width="15%"><img src="images/img_15.gif" width="22" height="17" alt=""></td>
<td background="images/img_16.gif" width="82%"><img src="images/img_16.gif" width="23" height="17" alt=""></td>
<td width="3%"><img src="images/img_18.gif" width="20" height="17" alt=""></td>
</tr>
</table>
</body>
</html>
คือมันไม่สามารถแทรก php ได้ครับ ต้องแทรกคำสั่งตามนี้อย่างไรครับ
<? include('../webboard/show10.php');
showTopboard('show10',10);
?>
ขอบพระคุณมากครับ
แทรก php ลงใน *.tpl
Moderator: mindphp, ผู้ดูแลกระดาน
- mindphp
- ผู้ดูแลระบบ MindPHP
- โพสต์: 41230
- ลงทะเบียนเมื่อ: 22/09/2008 6:18 pm
- ติดต่อ:
Re: แทรก php ลงใน *.tpl
จุดประสงค์ ของ template file คือ แยก php ออก จาก html
ถ้าจะใส่ คำสั่ง php ต้องใส่ ที่ไฟล์ php ที่เรียกใช้ template นั้นๆ แล้วกำหนด ตำแหน่งที่ต้องการแสดงใน template file เพิ่มเอาเองครับ
ถ้าจะใส่ คำสั่ง php ต้องใส่ ที่ไฟล์ php ที่เรียกใช้ template นั้นๆ แล้วกำหนด ตำแหน่งที่ต้องการแสดงใน template file เพิ่มเอาเองครับ
ติดตาม VDO: http://www.youtube.com/c/MindphpVideoman
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
-
- PHP Newbie
- โพสต์: 2
- ลงทะเบียนเมื่อ: 26/10/2008 7:31 pm
Re: แทรก php ลงใน *.tpl
อยากเห็นตัวอย่างครับ
- mindphp
- ผู้ดูแลระบบ MindPHP
- โพสต์: 41230
- ลงทะเบียนเมื่อ: 22/09/2008 6:18 pm
- ติดต่อ:
Re: แทรก php ลงใน *.tpl
รูปแบบการเขียน ขึ้นอยู่กับ template engine ที่ท่านใช้ ครับ
ตามตัวอย่างไฟล์ที่ยกมา เช่น
ตามตัวอย่างไฟล์ที่ยกมา เช่น
โค้ด: เลือกทั้งหมด
<div>{$message}</div>
<FORM method="POST" action="{$action}{$popup}">
ติดตาม VDO: http://www.youtube.com/c/MindphpVideoman
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
-
- Similar Topics
- ตอบกลับ
- แสดง
- โพสต์ล่าสุด
-
-
โพสต์ใหม่ แทรก Icon ใน Office 365
โดย teenproza7 » 27/05/2019 10:54 am » ใน Microsoft Office Knowledge & line & Etc - 0 ตอบกลับ
- 1471 แสดง
-
โพสต์ล่าสุด โดย teenproza7
27/05/2019 10:54 am
-
-
-
โพสต์ใหม่ วิธีเรียกใช้ไฟล์ CSS และ Js ลงใน Extension ของ Joomla
โดย Patipat » 10/07/2019 5:07 pm » ใน Joomla Developing Knowledge - 0 ตอบกลับ
- 919 แสดง
-
โพสต์ล่าสุด โดย Patipat
10/07/2019 5:07 pm
-
-
-
โพสต์ใหม่ วิธีการติดตั้ง Chromedriver ลงใน selenium
โดย Panchalee » 24/01/2018 7:02 pm » ใน Software testing - 0 ตอบกลับ
- 3387 แสดง
-
โพสต์ล่าสุด โดย Panchalee
24/01/2018 7:02 pm
-
ผู้ใช้งานขณะนี้
สมาชิกกำลังดูบอร์ดนี้: ไม่มีสมาชิกใหม่ และบุคลทั่วไป 107