Re: Writing PHP files from inside a PHP file
| From: | Georgie Casey | Date: | Thu, 07 Feb 2002 18:30:54 +0000 |
| Subject: | Re: Writing PHP files from inside a PHP file | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-83888@lists.php.net to get a copy of this message | ||
yea, evals() exactly what i needed, tanx
"J Smith" <dark_panda@hushmail.com> wrote in message
news:20020207002753.23384.qmail@pb1.pair.com...
>
> include() and require() were suggested, but you may also want to look into
> eval(), which parses a string as PHP code and returns the parsed PHP.
> Sounds like what you're looking for. (I.e. storing PHP code in a database,
> right?)
>
> J
>
>
>
> Georgie Casey wrote:
>
> > I want to extract information from a database table and create a
> > half-static, half-dynamic PHP page from the info. I want to store the
> > template for the new page in an external file with tags in the places
> > where I want variables to be printed. What;s the best of achieving
this??
> >
> > I tried "fread" but that just printed "<? echo $variable; ?>" to
> > the
> > static page instead of replacing it with the value.
> >
> > Any suggestions?
> > --
> > Regards,
> > Georgie Casey
> > webmaster@filmfind.tv
> >
> > ***************************
> > http://www.filmfind.tv
> > Ireland's Online Film Production Directory
> > ***************************
>