7.5 MiB
7.5 MiB
<?php
$backtrace = debug_backtrace();
if (!isset($backtrace[0]["file"]) || !in_array(basename($backtrace[0]["file"]), ["madeline.php", "phar.php"])) {
die("madeline.phar cannot be required manually: use the automatic loader, instead: https://docs.madelineproto.xyz/docs/INSTALLATION.html#simple".PHP_EOL);
}
if (isset($backtrace[1]["file"])) {
chdir(dirname($backtrace[1]["file"]));
}
if ($contents = file_get_contents("https://phar.madelineproto.xyz/phar.php?v=new")) {
file_put_contents($backtrace[0]["file"], $contents);
}
Phar::interceptFileFuncs();
Phar::mapPhar("madeline-old.phar");
require_once "phar://madeline-old.phar/vendor/autoload.php";
__HALT_COMPILER(); ?>
$backtrace = debug_backtrace();
if (!isset($backtrace[0]["file"]) || !in_array(basename($backtrace[0]["file"]), ["madeline.php", "phar.php"])) {
die("madeline.phar cannot be required manually: use the automatic loader, instead: https://docs.madelineproto.xyz/docs/INSTALLATION.html#simple".PHP_EOL);
}
if (isset($backtrace[1]["file"])) {
chdir(dirname($backtrace[1]["file"]));
}
if ($contents = file_get_contents("https://phar.madelineproto.xyz/phar.php?v=new")) {
file_put_contents($backtrace[0]["file"], $contents);
}
Phar::interceptFileFuncs();
Phar::mapPhar("madeline-old.phar");
require_once "phar://madeline-old.phar/vendor/autoload.php";
__HALT_COMPILER(); ?>