Created
March 21, 2019 07:07
-
-
Save melvinstanly/b066b22c60c80e6cc41b701c76ab101a to your computer and use it in GitHub Desktop.
Get all php files added using include or require
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
<?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