Created
September 20, 2017 01:27
-
-
Save bryanrsebastian/a26d36c3d985a360e1ac91a861cc8593 to your computer and use it in GitHub Desktop.
This file contains 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 php inside the folder | |
* @param string $folder folder name | |
* @return void include all the php inside the folder that you enter. | |
*/ | |
if ( ! function_exists( 'include_all_php' ) ) | |
{ | |
function include_all_php( $folder ) | |
{ | |
foreach ( glob( dirname(__FILE__)."/{$folder}/*.php" ) as $filename ) | |
{ | |
include_once( $filename ); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment