Skip to content

Instantly share code, notes, and snippets.

@aertmann
Created March 9, 2012 14:00
Show Gist options
  • Save aertmann/2006620 to your computer and use it in GitHub Desktop.
Save aertmann/2006620 to your computer and use it in GitHub Desktop.
<?php
/* *
* This script belongs to the FLOW3 framework. *
* *
* It is free software; you can redistribute it and/or modify it under *
* the terms of the GNU Lesser General Public License as published by the *
* Free Software Foundation, either version 3 of the License, or (at your *
* option) any later version. *
* *
* This script is distributed in the hope that it will be useful, but *
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- *
* TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser *
* General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with the script. *
* If not, see http://www.gnu.org/licenses/lgpl.html *
* *
* The TYPO3 project - inspiring people to share! *
* */
$rootPath = isset($_SERVER['FLOW3_ROOTPATH']) ? $_SERVER['FLOW3_ROOTPATH'] : FALSE;
if ($rootPath === FALSE && isset($_SERVER['REDIRECT_FLOW3_ROOTPATH'])) {
$rootPath = $_SERVER['REDIRECT_FLOW3_ROOTPATH'];
}
if ($rootPath === FALSE) {
$rootPath = dirname(__FILE__) . '/../';
} elseif (substr($rootPath, -1) !== '/') {
$rootPath .= '/';
}
$bootstrapPath = 'Packages/Framework/TYPO3.Setup/Classes/Core/Bootstrap.php';
if (file_exists($rootPath . $bootstrapPath) === FALSE) {
echo('TYPO3.Setup package is not available (Error #1328789313)' . PHP_EOL);
exit(1);
}
require($rootPath . $bootstrapPath);
$bootstrap = new \TYPO3\Setup\Core\Bootstrap($rootPath);
$bootstrap->run();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment