Last active
July 28, 2017 08:29
-
-
Save henrytran9x/890d9e2538e11be199df7749eda37111 to your computer and use it in GitHub Desktop.
Auto include file *.php in by directory !
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// include All file php in directory API | |
$dirAPI = array_filter(glob(path_dir_root), 'is_dir'); | |
foreach($dirAPI as $dir){ | |
foreach (glob("$dir/*.php") as $filename) | |
{ | |
include $filename; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment