Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@nielslange
Created November 11, 2019 10:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nielslange/2b2667200e8050dc75469ad2c446fdb8 to your computer and use it in GitHub Desktop.
Save nielslange/2b2667200e8050dc75469ad2c446fdb8 to your computer and use it in GitHub Desktop.
foreach( $files as $key => $filename ) {
if ( ( basename( $filename ) == '..' )
|| ( basename( $filename ) == '.' )
){
continue;
}
if ( substr( $filename, -4 ) == '.php' && ! is_dir( $filename ) ) {
$php[$filename] = file_get_contents( $filename );
$php[$filename] = tc_strip_comments( $php[$filename] );
}
else if ( substr( $filename, -4 ) == '.css' && ! is_dir( $filename ) ) {
$css[$filename] = file_get_contents( $filename );
}
else {
$other[$filename] = ( ! is_dir($filename) ) ? file_get_contents( $filename ) : '';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment