/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php if($include_globals){ } require($file); return $template_html; } $template_vars['title'] = 'Hello World!'; $template_vars['text'] = 'Hello World!'; 'http://www.bigsmoke.us/php-templates/functions', 'http://www.php.net/' ); $html = apply_template("_main.tpl.php",$template_vars); echo $html; /////////////////// // _main.tpl.php // /////////////////// /* <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title><?php echo $title; ?></title> <link rel="shortcut icon" type="image/png" href="favicon.png" /> <link rel="stylesheet" href="./css/reset.css" type="text/css" media="all" /> <link rel="stylesheet" href="./css/text.css" type="text/css" media="all" /> <link rel="stylesheet" href="./css/style.css" type="text/css" media="screen, projection" /> <link rel="stylesheet" href="./css/print.css" type="text/css" media="print" /> <!--[if IE]> <link rel="stylesheet" href="./css/ie.css" type="text/css" media="screen, projection" /> <![endif]--> <link rel="script" href="./scripts/javascript.js" type="text/javascript" /> </head> <body> <p><?php echo $text; ?></p> <ul> <?php foreach($links as $link): ?> <li><a href="<?php echo $link; ?>" title="A Link"><?php echo $link; ?></li> <?php endforeach; ?> </ul> </body> </html> */ ?>
URL: http://www.bigsmoke.us/php-templates/functions