List directories with php and compare them

Sometimes it’s important to quickly highlight differences between two folders structure.

It could happen expecially when you are obliged to work on cheap environments, without console and you need to understand if there are differences among your local filesystem and the remote one.

You can copy the script in each directory and naming it scandir.php, than reach it by browser at the url http://path-to-your-base-folder/scandir.php.

In this way you have just executed the script, do it on each environment directory and occasionally compare them.

To compare there are Notepad++, git diff, WinMerge and plenty of open source tools.

Scandir is a php function, check it, I have wrote this code using an example I found there.

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *