Skip to content

Commit

Permalink
Merge 461ca2c into 60f0acd
Browse files Browse the repository at this point in the history
  • Loading branch information
friscoMad committed Dec 7, 2017
2 parents 60f0acd + 461ca2c commit 9230aad
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions config.example.php
Expand Up @@ -53,14 +53,6 @@
## Subdirectory trick
function directory()
{
$root = $_SERVER['DOCUMENT_ROOT'];
$filePath = dirname(__FILE__);

if ($root == $filePath) {
return ''; // installed in the root
} else {
$subdir_path = explode('/', $filePath);
$subdir = end($subdir_path);
return $subdir;
}
##https://stackoverflow.com/questions/2090723/how-to-get-the-relative-directory-no-matter-from-where-its-included-in-php
return substr(str_replace('\\', '/', realpath(dirname(__FILE__))), strlen(str_replace('\\', '/', realpath($_SERVER['DOCUMENT_ROOT']))));
}

0 comments on commit 9230aad

Please sign in to comment.