mirror of
https://github.com/friendica/friendica
synced 2025-01-08 02:44:43 +00:00
refactor chdir() call
This commit is contained in:
parent
7d10d04768
commit
b94697678e
1 changed files with 1 additions and 13 deletions
|
@ -50,19 +50,7 @@ use Friendica\Core\Logger\Capability\LogChannel;
|
|||
use Friendica\Security\ExAuth;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
if (sizeof($_SERVER["argv"]) == 0) {
|
||||
die();
|
||||
}
|
||||
|
||||
$directory = dirname($_SERVER["argv"][0]);
|
||||
|
||||
if (substr($directory, 0, 1) != DIRECTORY_SEPARATOR) {
|
||||
$directory = $_SERVER["PWD"] . DIRECTORY_SEPARATOR . $directory;
|
||||
}
|
||||
|
||||
$directory = realpath($directory . DIRECTORY_SEPARATOR . "..");
|
||||
|
||||
chdir($directory);
|
||||
chdir(dirname(__FILE__, 2));
|
||||
|
||||
require dirname(__DIR__) . '/vendor/autoload.php';
|
||||
|
||||
|
|
Loading…
Reference in a new issue