I've 'inherited' some php code. Some really, really shoddy code. Not trusting its security I plan to go through each file and make sure it's ok. However to hopefully make this easier, I would like to remove all (well as many as possible) unnecessary files from the server.
I know this won't be completely possible, but I would like to scan through folders like 'include' and 'inc' and see if no files in the whole webtree make reference to it, if this the case, I know its safe to remove the file. I figure this is a case of getting all include() and require(_once) references made by every file in the directory and then comparing it to the list of files in the inc/include directories.
Anyone done something similar before?
Also, what alternatives to include(_once) and require(_once) are there?
Ta!