I am trying to do something very simple, open a file, read a line, find the position of a string
while (!feof($file_handle))
{
$line = fgets($file_handle);
stripos ($line, "java");
}
I am having a very strange issue. I noticed if I search for a single char stripos ($line, "j"); i get a return value. As soon as I would add a second character, it would no longer work. In testing, I decided to echo the lines of the file to the screen. Every character has a space between it, on every single line.
Ex: H T M L x m l n s = " h t t p : / / w w w . w 3 . o r g / 1 9 9 9 / x h t m l "
The original file has no spaces like this. I also tried writing the line to a seperate file, and there are no spaces. I'm pretty sure this spacing issue is why I can't find my string position, but I have no idea why this would be happening.
Start Free Trial