file comparision
Moderator: General Moderators
file comparision
how do i compare two files in php ? can anyone help me ?
you can use file() or file_get_contents(), and the compare the arrays or strings
dont know if this is the most effective way though
EDIT: Oren's response is better
dont know if this is the most effective way though
EDIT: Oren's response is better
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
use filesize() before using md5_file(). Why spend time doing an md5 hash if they are different sizes. 