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]
|