I have 25 files under 1 folder, which I have included using glob in PHP
foreach (glob(PATH."*.php") as $filename) {
require_once $filename;
}
I want to exclude 1 file from this list while testing, how do I achieve that ?
The preg_grep would be difficult to change again and again. What I am trying to achieve is not to mess with the current things and add new files in the folder. I want to exclude the newly added file until it is error free and doesn’t harm the current setup.
Specifically exclude the file:
If you want to get really sexy:
Or just temporarily remove the problem file from the directory.