You are here: Re: strpos for <? and ?> problem « PHP Programming Language « IT news, forums, messages
Re: strpos for <? and ?> problem

Posted by julian_m on 10/11/66 11:39

Julien CROUZET wrote:

> The probleme is here if : (strpos($buffer, '<?') === true){
>
> strpos returns the position of the first occurence of your searched
> string or FALSE if it doesn't find it.
>
> The operator === is a STRICT comparison, that means that it'll be true
> if the operands are EXACTLY the same.
>
> As your strpos finds a '<?', it returns its position in your file,
> (ie: 45), and 45 is not EXACTLY true.
>
> You have to change
> strpos($buffer, '<?') === true){
> for
> strpos($buffer, '<?') !== false){
>

two things:
1st: You're faster than the light! Your advice works nice. Thanks!

2nd: What would be EXACTLY true? 1?

regads - jm

 

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

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