Centralized PHP file for common directories

Still need to update other PHP functions to use this file
Minor name change; deleted empty file