Re: how to include() a string
| From: | Luca | Date: | Sun, 29 Apr 2001 16:42:31 +0000 |
| Subject: | Re: how to include() a string | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-50816@lists.php.net to get a copy of this message | ||
Andi Gutmans <andi@zend.com> wrote:
> Sometimes eval() is the right solution.
> I can't think of a solution if I don't know *exactly* what you are
> trying to do and why you need eval().
Yes, I'm sorry, I should have explained myself better. I'm just a
beginner, it's very likely that I'm doing things the complicated
way. Here's what I'm trying to do: all requests on my site (just
a personal site for testing, it's not even online) are 'redirected'
by mod_rewrite to a single script, which builds the pages by putting
together a header file, a navbar file, a footer file, and a specific
content file. The actual processing is a bit more complex, but this
should give an idea. The content is in XML: it contains the HTML
code (XHTML 1.0 compliant), along with the information needed to
build the <head></head> section of the page (title, description,
keywords, etc.). I retrieve the HTML as a string by using
xslt_process() and an appropriate XSL stylesheet. Then I need to
include it in the page, but I cannot just print() it as it may
have PHP tags in it: that's why I need to use eval().
I hope my explanation makes sense, though I'm afraid it's not
that clear...
Regards,
Luca