You are here: Re: Something like eval... « PHP Programming Language « IT news, forums, messages
Re: Something like eval...

Posted by Wayne on 09/01/06 20:37

On Fri, 1 Sep 2006 19:14:15 +0200, <talthen.z-serwera.o2@nospam.pl>
wrote:

>Hello,
>I have a php file with php and html code. It looks like this:
>
><html> ...<? ... ?> </html>
>
>If I had this file on disk then I could just include it, but I have this
>file in string.
>When I eval() the string I got a parse error. How can I execute it?

Would you believe you do this:

eval('?>'.$my_html_text.'<?php');

It's bizzare, but it works.

 

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

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