echo '<script> var myvar = ' . json_encode(fread(...)) . '; <script>';
Opening a file with append mode (a as the first character in the mode argument) shall cause all subsequent writes to the file to be forced to the then current end-of-file, regardless of intervening calls to fseek().
When redirecting to a local URL, additional environment variables are set so that the response can be further customized. They are not sent to external URLs.
fastcgi_param REDIRECT_URL $uri;
register_shutdown_function(function () {
posix_kill(getmypid(), SIGKILL);
});
(я на shared-хостинге, так как на большее у меня нет ни денег, ни мозгов).
Про скулиту ты все правильно написал. Те же файлы, вид сбоку.
function baseConvert(string $number, int $fromBase, int $toBase) {
$chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_';
if ($fromBase == 10) {
$int = $number;
} else {
$int = 0;
$len = strlen($number);
$numberRev = strrev($number);
for ($i = 0; $i < $len; $i++) {
$int = gmp_add($int, gmp_mul($chars[strpos($chars, $numberRev[$i])], gmp_pow($fromBase, $i)));
}
}
$converted = '';
while (gmp_cmp($int, 0) > 0) {
list ($int, $remainder) = gmp_div_qr($int, $toBase);
$converted = $chars[gmp_intval($remainder)] . $converted;
}
return $converted;
}