[ciapug] Templating System
Dave J. Hala Jr.
dave at 58ghz.net
Fri Jun 24 08:36:27 CDT 2005
That's a good point. I'll buy that.
However, if keep you it simple, you won't have that vulnerability. I
think that a "template" like the one below is fairly safe. The Java
script is couple of tools that format date/ssn & phone numbers on the
fly.
<html>
<head>
<title> <? echo $title ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Pragma" content="no-cache">
<script language="JavaScript" src="/java/ssn-date-phn.js"
type="text/javascript" ></script>
<style type="text/css">@import "../css/main.css";</style>
</head>
<body bgcolor="#ffffff" >
<? echo $page ?>
</body>
</html>
On Fri, 2005-06-24 at 08:25, Tony Bibbs wrote:
> This best sums up why PHP isn't such a good template engine:
>
> http://www.akbkhome.com/blog.php/View/80/PHP+as+a+template+engine%2C+or+recipe+for+disaster%3F.html
>
> In short, you have to save developers from themeselves sometimes.
>
> --Tony
>
> Dave J. Hala Jr. wrote:
> > I was thinking about what Tim said the other day regarding "templating
> > systems". I think the main point was: how is inserting a <? echo
> > $content ?> tag into an html document really any differant than if you
> > just inserted some if/then logic etc.
> >
> > I agree with Tim, its more or less the same thing. For me, the problem
> > that I was trying to solve two-fold:
> >
> > 1. Seperate the dynamically generated content from the static content,
> > so that an end user (or graphic designer) could edit the html without
> > mucking around in the php code.
> > 2. Make it user to make changes to the CSS include files, thereby making
> > it simple to effect system wide cosmetic changes in the both the html
> > and the dynamically generated content.
> >
> > Tim did you have something else in mind?
> >
> > :) Dave
> >
> >
> >
> >
> _______________________________________________
> ciapug mailing list
> ciapug at cialug.org
> http://cialug.org/mailman/listinfo/ciapug
--
Open Source Information Systems (OSIS)
Dave J. Hala Jr. <dave at osis.us>
641.485.1606
More information about the ciapug
mailing list