Skip to content

Instantly share code, notes, and snippets.

@yurifrl
Created January 6, 2014 04:56
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 yurifrl/8278477 to your computer and use it in GitHub Desktop.
Save yurifrl/8278477 to your computer and use it in GitHub Desktop.
Function to locate myself
function where_am_i($dir = '.') {
$myDirectory = opendir($dir);
while($entryName = readdir($myDirectory)) {
$dirArray[] = $entryName;
}
dump($dirArray);
closedir($myDirectory);
}
where_am_i('.');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment