Re: critique this code please

From: Date: Sun, 02 Jan 2005 02:46:40 +0000
Subject: Re: critique this code please
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-205487@lists.php.net to get a copy of this message
* Thus wrote Sebastian: > i have this small function for a template system (if you want to call it > that ;) > > my idea was having something simple to separate html code from php and i > think using something like smarty is too big for me and i really dont have > time to learn to use it. so i have this code here: > > http://www.cstrike-planet.com/function.phps > > i call this function which reads .tpl files which contain html and some > $vars, then in my pages use something like: > > eval('echo("' . template('home_index') . '");'); I don't quite understand the purpose of this when either an include() or readfile() will do the job, and not to mention much faster and less memory intensive. Curt -- Quoth the Raven, "Nevermore."

« previous php.general (#205487) next »