FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Nested PHP
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Nested PHP [message #184841 is a reply to message #184839] Tue, 11 February 2014 12:55 Go to previous messageGo to previous message
Christoph Michael Bec is currently offline  Christoph Michael Bec
Messages: 207
Registered: June 2013
Karma:
Senior Member
Tim Streater wrote:

> In article
> <1lgwk0i.o5j5ms19glf6kN%adrian(at)poppyrecords(dot)invalid(dot)invalid>, Adrian
> Tuddenham <adrian(at)poppyrecords(dot)invalid(dot)invalid> wrote:
>
>> Tim Streater <timstreater(at)greenbee(dot)net> wrote:
>>
>> [...]
>>>> I wondered if there was a command which I could embed instead of the
>>>> "print $text;", which would cause the resulting HTML to be processed
>>>> like a normal webpage, so that the php within it would also run?
>>>> Well, include might do it, I suppose. On first reading of the include
>>> ref I gave above, I assumed that include's argument had always to be a
>>> specific file, but there seem to be some hints in the user examples
>>> that imply you could do:
>>>> include $filenamer;
>>>> instead of
>>>> print $text;
>>>> but I've never tried this myself.
>>
>> I had already tried it and it didn't work. :-(
>
> Then either the file has to be in a specific place, or you can write
> $text out to a /tmp file with a specific name and use that with the
> include.

Or evaluate the generated PHP code with eval(). However, I suppose
there's a design mistake here. Generating and executing PHP code on the
fly doesn't seem to be reasonable (at least for most purposes).

--
Christoph M. Becker
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Filling an array with random input doesn't quite work
Next Topic: string length
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 20:29:06 GMT 2024

Total time taken to generate the page: 0.04569 seconds