Created
January 24, 2018 13:09
-
-
Save nicokoelewijn/5aeb68c7adccef1560d49c72f50ac2c4 to your computer and use it in GitHub Desktop.
include all files in directory
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
foreach (scandir($dir) as $filename) { | |
$path = $dir . $filename; | |
if (is_file($path) && $filename !== '.DS_Store') { | |
require_once $path; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment