You are here: Re: HTML code in eval « PHP Programming Language « IT news, forums, messages
Re: HTML code in eval

Posted by d on 03/10/06 12:26

"Johannes Matjeschk" <Johannes.Matjeschk@googlemail.com> wrote in message
news:1141980306.543975.27770@j33g2000cwa.googlegroups.com...
> eval(); is evil. You should use it only in extreme situations.
>
> You can also try here document syntax.
>
> http://de.php.net/echo

They should just rename it to evil() and get it over with. "If eval() is
ever the answer, you've screwed up the question" :-P

> sunnyboy@europe.com wrote:
>> Hi
>>
>> I'm currently trying to put some HTML code into a variable and to use
>> it later.
>> Any ideas, why TEST1 in the following example displays a link, while
>> TEST2 only displays a text?
>>
>> Any help appreciated.
>>
>> <html>
>> <head>
>> </head>
>>
>> <body>
>>
>> <!-- TEST1 -->
>> <a href=\"www.test.com\">this is test1</a>
>>
>> <br><br>
>>
>> <!-- TEST2 -->
>> <?
>> $teststr="?><a href=\"www.test.com\">this is test2</a><?php";
>> eval($teststr);
>> ?>
>>
>> </body>
>> </html>
>

 

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

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