ชุมชนออนไลน์ หาเพื่อนคุย รวมเกมส์ ดูดวง ฟังเพลง ฟุตบอล ดารา และอีกมากมาย

General Category => มุมเว็บมาสเตอร์ไทย => ข้อความที่เริ่มโดย: Adminis ที่ มกราคม 23, 2014, 05:58:39 PM

หัวข้อ: การแทรก Script PHP ใน HTML
เริ่มหัวข้อโดย: Adminis ที่ มกราคม 23, 2014, 05:58:39 PM
การแทรก Script PHP ใน HTML ทำได้ 4 แบบ

1. SGML Style
<? echo ("This is the PHP Command\n"); ?>

2. XML Style
<?php echo("This is the PHP Command\n"); ?>

3. Java Script Style
<script language="php">
echo ("This is the PHP Command"\n);
</script>

4. ASP Style
<% echo ("This is the PHP Command"\n); %>

ที่นิยมก็คือแบบแรก โดยเริ่มต้นด้วย <?  และจบด้วย ?> และตรงกลางจะเป็นคำสั่งในภาษา PHP

http://www.thaiwbi.com/course/php/php_in_html.html (http://www.thaiwbi.com/course/php/php_in_html.html)
หัวข้อ: Re: การแทรก Script PHP ใน HTML
เริ่มหัวข้อโดย: Adminis ที่ มกราคม 23, 2014, 06:00:09 PM
การสอดแทรกคำสั่งภาษา PHP ในเอกสาร HTM

http://www.bcoms.net/php/php02.asp (http://www.bcoms.net/php/php02.asp)