Beruflich Dokumente
Kultur Dokumente
ion 2. Fungsi dan command yang terdapat pada index.php function template(); function home(); fopen fclose global stripslashes eregi_replace echo switch default: break: cat: variable $main disimbolkan dengan <%main%> Langkah-langlah pembuatan template: 1. Membuat file theme.htm
<html> <body> <table cellpadding ="0" spacepadding="0" border="0"> <tr><td valign=top align=left> % main % </td></tr> </table> </body> </html>
$template = eregi_replace("<% content %>", "$content", $template); echo "$template"; } } function home() { global $main; include ("test.php"); template("$data"); } switch($action) { default: home(); break; } ?> 3. Membuat File test.php untuk ujicoba <?php $main.="Ini adalah uji coba membuat template HTML.<br /> Ini hanyalah uji coba"; ?> 4. Tes menggunakan browser