Skip to content

Instantly share code, notes, and snippets.

@nicokoelewijn
Created January 24, 2018 13:09
Show Gist options
  • Save nicokoelewijn/5aeb68c7adccef1560d49c72f50ac2c4 to your computer and use it in GitHub Desktop.
Save nicokoelewijn/5aeb68c7adccef1560d49c72f50ac2c4 to your computer and use it in GitHub Desktop.
include all files in directory
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