It's useful to compare two websites (Example, test and live versioning the same server) and show the differences, much faster than a FTP synchronization, and customizable (size differences instead of time, PHP copy commands with backup etc...).
Example of output:
How to use:
= new CompareDirs("e:/siti/symfapp/", "e:/siti/symfapp2/");
$c->addSkipPath(".svn".DIRECTORY_SEPARATOR);
$c->addSkipPath(".project".DIRECTORY_SEPARATOR);
$c->addSkipPath(".settings".DIRECTORY_SEPARATOR);
$c->compare();
echo "{$c->totalFiles} files. {$c->skippedFiles} skipped.
{$c->differencesNotFound} missing.{$c->differencesTime} time differences. ".$c->getHTML();
?>
View the codecomparedirs.php
No comments:
Post a Comment