|
Posted by Wenting, Marcel on 05/18/06 21:30
Drakazz wrote:
> This code doesn't look any cleaner, to me.
>
> None of my new site scripts have html embeded in them, how's that?
>
> for example, a bit of code:
> elseif ( $site->rget['0'] === "activate" && isset($site->rget['1']) &&
> ctype_alnum($site->rget['1']) ) {
> $activation = new Activation($site->rget['1']);
> logit();
> if ( $activation->valid(&$site) === true ) {
> $site->setView("activation.successful");
> }
> else {
> $site->setView("activation.error");
> }
> }
>
> which is then passing variables to the $site and then the Smarty
> template engine is being used to parse the output, which has embeded
> HTMl in PHP, but it's automatically generated and saves time from
> miximg HTMl with PHP, so your PHP scripts or HTML don't have to cry
> when you need to make any changed.
> And what's with the usage of <?= ?> and <? ?> ?! These are depreccated
> now and wouldn't work with normal PHP compiles.
> Always use <?php ?> !!!
>
Dear Drakazz,
You code does look nice, although only such a small part of code doesnt
say to much.
But I thought the question wasnt: "how to code nice in PHP together with
smarty?".
I dont use any template engines yet, I do see an advantage, but it's no
requisite for PHP.
I also recently compiled one of the latest PHP(5.x) versions, nothing
ordinary, just a regular ./configure, make, make install and the short
tags just work over here.
I totally agree that using <?php ?> is more nice, but dont talk about it
not working with normal compiles, coz it still does.
Marcel
Navigation:
[Reply to this message]
|