You are here: Re: Executing PHP in a variable? « PHP Programming Language « IT news, forums, messages
Re: Executing PHP in a variable?

Posted by larry on 11/11/06 20:17

brett wrote:
> I'm doing a file include as
>
> <?php $content = file_get_contents(TEMPLATEPATH . '/somefile.php');
> echo $content; ?>
>
> In somefile.php, there is PHP code. How can I execute the code once
> $content is displayed as above?
>
> Thanks,
> Brett

You want to use eval(), here is the entry on the on-line PHP manual (a
great reference for PHP coding):

http://us3.php.net/eval

Larry

 

Navigation:

[Reply to this 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

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