That sounds pretty efficient to me if all you want is whether they're
different. If you actually want to know how different, you could use
something like levenshtein() to compare the contents of the files as
strings.
http://www.php.net/manual/en/function.levenshtein.php

Or, for a more full solution, you could use PEAR::Text_Diff
http://pear.php.net/package/Text_Diff

On Sat, 17 Jul 2004 19:07:44 -0600, C.F. Scheidecker Antunes
<[EMAIL PROTECTED]> wrote:
> Hello all,
> 
> Is there a more efficient way to compare 2 TXT files other than reading
> line by line ?
> 
> What I was doing was reading line by line and compare both files, if one
> line is different the loops are interrupted and the function returns true.
> 
> Any ideas?
> 
> Thanks in advance.
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> !DSPAM:40f9cc90104731699226006!
> 
> 


-- 
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

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

Reply via email to