Re: parsing a file to a variable?
| From: | (Richard Lynch) | Date: | Fri, 30 Jun 2000 18:44:50 +0000 |
| Subject: | Re: parsing a file to a variable? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-4098@lists.php.net to get a copy of this message | ||
In article <007101bfda4b$7b241d70$f4790fd8@orange>,
Charles@AlcatrazDesignGroup.com ("Charles Killian") wrote:
> template.php:
> <table border=3D1>
> <tr>
> <td><?=3D$var?></td>
> </tr>
> </table>
>
> execute.php:
> $var =3D 1;
> $parsed =3D parse("template.php");
>
> I don't want to include() the file. I want the parsed file in a =
> variable.
>
> What I'm doing:
> I'm trying to create a template system along the lines of XTemplate, but =
> want to allow php code inside the templates.
See the Zend.com Tips for a solution. Search for 'ob_start'
--
Richard Lynch | If this was worth $$$ to you, buy a CD
US Customer Support Director | from one of the artists listed here:
Zend Technologies USA | http://www.L-I-E.com/artists.htm
http://www.zend.com | (this has nothing to do with Zend,
duh!)