Reply to Re: using echo but need something to execute php code

Your name:

Reply:


Posted by Jeff North on 04/29/07 00:49

On Sat, 28 Apr 2007 22:11:45 GMT, in comp.lang.php "Jon Slaughter"
<Jon_Slaughter@Hotmail.com>
<BEPYh.1450$RX.384@newssvr11.news.prodigy.net> wrote:

>|
>| "Janwillem Borleffs" <jw@jwscripts.com> wrote in message
>| news:4633bec1$0$31213$dbd43001@news.euronet.nl...
>| > Jon Slaughter wrote:
>| >> Is there any command that essentially executes the code and then
>| >> echo's it?
>| >
>| > For this specific case you could use eval:
>| >
>| > $code = "?><body>blah<?php echo 'Hello'; ?></body>";
>| > eval($code);
>| >
>| > Note that the closing tag at the beginning of the eval string is
>| > mandatory.
>| >
>| >
>|
>| Ok. Thats not the specific case I need but maybe it will still work? It is
>| essentially what I have. That is, I have an html file with some php code in
>| it similar to the example but just more complex. (actually right now its
>| just plain html but when I want to add some php stuff I'll need to be able
>| to have it evaluated).

Make sure the file has the extension of php.
---------------------------------------------------------------
jnorthau@yourpantsyahoo.com.au : Remove your pants to reply
---------------------------------------------------------------

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация