You are here: Re: binary strrpos? « PHP Programming Language « IT news, forums, messages
Re: binary strrpos?

Posted by David Haynes on 02/07/06 03:12

giloosh wrote:
> Hello,
> I am having trouble getting the strrpos from a file on a linux machine.
>
> someone says it has something to do with binary?
> The code works fine on windows, but when i run it on a linux server it
> gives me a different result
>
> heres an examples:
> <?
> $haystack= file_get_contents("mysite.com");
>
> $needle = "blabla";
>
> $x = strrpos($haystack, $needle);
>
> echo $x
>
> //$x returns 201 on windows
> //$x returns 300 on linux
> ?>
>
> Any ideas?
>
My *guess* would be that the Linux strrpos is counting the \r's whereas
the Windows one is not...

-david-

 

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

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