- Баллы
- 173
- Имя в Minecraft
- OsipXD
@ARGENT, тут, как говорится: как только так сразу. На данный момент это моя самая приоритетная задача. Уже написал отображение.
Следуйте инструкциям в видео ниже, чтобы узнать, как установить наш сайт как веб-приложение на главный экран вашего устройства.
Примечание: Эта функция может быть недоступна в некоторых браузерах.
/home/chater/rus-magicworld.org/status
/home/chater/rus-magicworld.org/status
Warning: syntax error, unexpected '=' in log.ini on line 3 in /home/chater/rus-magicworld.org/status/inifile.php on line 13


Вместо картинки вида Server 0/100 , получается такая Server 1@satan_007, ну не совсем прилично - понятие растяжимое
Warning: file_put_contents(log.ini): failed to open stream: Permission denied in /home/p*****1/www/*****.com/monitor/inifile.php on line 49
<?php
if (!defined('_BR_')) define('_BR_',chr(13).chr(10));
class TIniFileEx {
public $filename;
public $arr;
function __construct($file = false){
if ($file)
$this->loadFromFile($file);
}
function initArray(){
$this->arr = parse_ini_file($this->filename, true);
}
function loadFromFile($file){
$result = true;
$this->filename = $file;
if (file_exists($file) && is_readable($file)){
$this->initArray();
}
else
$result = false;
return $result;
}
function read($section, $key, $def = ''){
if (isset($this->arr[$section][$key])){
return $this->arr[$section][$key];
} else
return $def;
}
function write($section, $key, $value){
if (is_bool($value))
$value = $value ? 1 : 0;
$this->arr[$section][$key] = $value;
}
function updateFile(){
$result = '';
foreach ($this->arr as $sname=>$section){
$result .= '[' . $sname . ']' . _BR_;
foreach ($section as $key=>$value){
$result .= $key .'='.$value . _BR_;
}
$result .= _BR_;
}
file_put_contents($this->filename, $result);
return true;
}
function __destruct(){
$this->updateFile();
}
}
?>