On Mon, 17 Mar 2003 13:14:46 -0700, Kevin Stone wrote about "Re: [PHP]
Getting false positive on strpos ... despite doublecheck... HELP!" what
the universal translator turned into this:

>> It interprets the text correctly 100%, BUT I get a false positive date
>> check at the end of the file, which results in an extra (today's) date.
>> Extract of resulting HTML (last part):
>>
>> <span class="ylwbld">On 5 January 2003 21.17.18 +0100, Knap Knapstrup</a>
>> of city, country wrote:</span><br>
>> <span class="whttxt">Adder badder, pladder madder. Adder badder, pladder
>> madder. Adder badder, pladder madder. Adder badder, pladder madder. Adder
>> badder, pladder madder. Adder badder, pladder madder. Adder badder,
>> pladder madder. Adder badder, pladder madder. Adder badder, pladder
>> madder. Adder badder, pladder madder.</span><br>
>> <span class="ylwbld">Link:</span> <a href="http://www.anotherlink.ext";
>> target="_new" class="ylwlink">www.anotherlink.ext</a><br>
>> <hr width="85%" color="#ffffff" noshade align="center">
>> <span class="ylwbld">On 17 March 2003 00.00.00 +0100,
>>
>> ^^^NOTE THE LAST LINE!!!
>> It's not supposed to be there ... Can anyone tell me how to avoid it, and
>> possibly what causes it???
>>
>> Side-remark: The text-file is to be written from entries in a form I
>> haven't coded yet. Like I said in the top, some of the fields are
>> optional, and the read script is made to compensate for this.
>
>Rene, I copied and pasted your code into a test file and ran it on my
>server.  It worked just fine for me.. no extra date line at the bottom.
>Don't know what to say.

Well ... the guestbook.txt I've got for testing was written in windows XP,
and has an empty line at the end. The extract of it that I posted does not
(depending on how you cut'n'paste it of course).

I've got a feeling that the empty line had something to do with it ...
since it did at both on my testserver (PHP 4.2.3 on Apache 2.0.40 on WinXP
Pro) and at my website (PHP 4.2.3 on Apache 1.3.23 on Linux 2.2.4).

But after rewriting the code according to Rasmus' suggestion, it works
correctly, without the extra date line ...

So now I just gotta read up on the write functions to make the part that
actually makes the source file...

Thx all

Rene

-- 
Rene Brehmer

This message was written on 100% recycled spam.

Come see! My brand new site is now online!
http://www.metalbunny.net

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to