Skip to content

Instantly share code, notes, and snippets.

@melvinstanly
Created March 21, 2019 07:07
Show Gist options
  • Save melvinstanly/b066b22c60c80e6cc41b701c76ab101a to your computer and use it in GitHub Desktop.
Save melvinstanly/b066b22c60c80e6cc41b701c76ab101a to your computer and use it in GitHub Desktop.
Get all php files added using include or require
<?php
$included_files = get_included_files();
foreach ($included_files as $filename) {
if( strpos( $filename, 'file_name') !== false ){ //Check if filename
echo $filename.'<br>';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment