Created
May 13, 2014 09:59
-
-
Save BugBuster1701/4b7a1fafe59fd65fd656 to your computer and use it in GitHub Desktop.
Contao und dynamischer Pfad für die Initialisierung
This file contains hidden or 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 | |
/* | |
* Damit ist es egal ob das Modul von composer normal als ZIP geladen und entpackt wird | |
* oder per git clone und dynamischen links, wodurch die Verzeichnisebene eine andere wird | |
*/ | |
/** | |
* Initialize the system | |
*/ | |
$dir = __DIR__; | |
while ($dir != '.' && $dir != '/' && !is_file($dir . '/system/initialize.php')) | |
{ | |
$dir = dirname($dir); | |
} | |
if (!is_file($dir . '/system/initialize.php')) | |
{ | |
echo 'Could not find initialize.php!'; | |
exit(1); | |
} | |
define('TL_MODE', 'BE'); | |
require($dir . '/system/initialize.php'); | |
//weiter im Quelltext, z.B. die runonce |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment