Skip to content

Instantly share code, notes, and snippets.

@ChristianGaertner
Created May 25, 2013 16:54
Show Gist options
  • Save ChristianGaertner/5649788 to your computer and use it in GitHub Desktop.
Save ChristianGaertner/5649788 to your computer and use it in GitHub Desktop.
A simple way of including all files in a directory.
$dir = 'classes';
foreach (glob($dir . '/*.php') as $class_file) {
include $class_file;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment